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:
parent
3354b9e47a
commit
00a226a678
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue