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:
commit
f0b1798057
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…
Add table
Reference in a new issue