mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
Replace to_hash with XPATH
This commit is contained in:
parent
cbb9cdad05
commit
d496407711
@ -45,7 +45,7 @@ begin
|
||||
one_client = OpenNebula::Client.new
|
||||
vm = OpenNebula::VirtualMachine.new_with_id(vmid, one_client)
|
||||
vm.info
|
||||
src_ds = vm.to_hash["VM"]["HISTORY_RECORDS"]["HISTORY"][-2]["DS_ID"]
|
||||
src_ds = vm.retrieve_elements("HISTORY_RECORDS/HISTORY/DS_ID")[-2]
|
||||
|
||||
if src_ds == dsid
|
||||
VCenterDriver::VirtualMachine.migrate_routine(vmid, host_orig, host_dest)
|
||||
|
Loading…
x
Reference in New Issue
Block a user