mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
B #4194: vCenter context data
Now refreshes NIC (alias) on detach (#4316) Signed-off-by: Carlos Herrera <cherrera@opennebula.systems>
This commit is contained in:
parent
8e6831ca47
commit
3fb291bac3
@ -44,7 +44,11 @@ host_id = drv_action['VM/HISTORY_RECORDS/HISTORY[last()]/HID']
|
||||
|
||||
begin
|
||||
vi_client = VCenterDriver::VIClient.new_from_host(host_id)
|
||||
vm = VCenterDriver::VirtualMachine.new(vi_client, vm_ref, vm_id)
|
||||
|
||||
one_item_xml = drv_action.retrieve_xmlelements('VM').first.to_xml
|
||||
one_item = OpenNebula::VirtualMachine.new(OpenNebula::XMLElement.build_xml(one_item_xml, 'VM'), vi_client)
|
||||
|
||||
vm = VCenterDriver::VirtualMachine.new_one(vi_client, vm_ref, one_item)
|
||||
|
||||
vm.regenerate_context
|
||||
rescue StandardError => e
|
||||
|
Loading…
x
Reference in New Issue
Block a user