1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #2038 from maestrodev/vsphere-wait_for_stop

[vsphere] Need to turn off vm and wait until off before destroying
This commit is contained in:
Wesley Beary 2013-08-06 07:42:07 -07:00
commit f0b1798057

View file

@ -98,7 +98,11 @@ module Fog
def destroy(options = {})
requires :instance_uuid
stop if ready? # need to turn it off before destroying
if ready?
# need to turn it off before destroying
stop
wait_for { !ready? }
end
service.vm_destroy('instance_uuid' => instance_uuid)
end