1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B #3125: Add wait_for_completion

To vCenter async Tasks that were missing it.
This commit is contained in:
Tino Vazquez 2019-03-25 16:24:34 +01:00
parent 4f2ca57244
commit 762a0fa9e1
No known key found for this signature in database
GPG Key ID: 2FE9C32E94AEABBE
2 changed files with 3 additions and 3 deletions

View File

@ -804,13 +804,13 @@ class Datacenter
case nr[:action]
when :update_dpg
begin
nr[:dpg].ReconfigureDVPortgroup_Task(:spec => nr[:spec])
nr[:dpg].ReconfigureDVPortgroup_Task(:spec => nr[:spec]).wait_for_completion
rescue Exception => e
raise "A rollback operation for distributed port group #{nr[:name]} could not be performed. Reason: #{e.message}"
end
when :update_dvs
begin
nr[:dvs].ReconfigureDvs_Task(:spec => nr[:spec])
nr[:dvs].ReconfigureDvs_Task(:spec => nr[:spec]).wait_for_completion
rescue Exception => e
raise "A rollback operation for distributed standard switch #{nr[:name]} could not be performed. Reason: #{e.message}"
end

View File

@ -371,7 +371,7 @@ class Datastore < Storage
end
else
copy_params[:destinationName] = "[#{target_ds_name}] #{target_path}"
get_fm.CopyDatastoreFile_Task(copy_params)
get_fm.CopyDatastoreFile_Task(copy_params).wait_for_completion
end
target_path