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

[vsphere] Need to turn off vm and wait until off before destroying

This commit is contained in:
Carlos Sanchez 2013-08-06 16:19:32 +02:00
parent 3354b9e47a
commit 00a226a678

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