mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
feature #2135: skip VMware cancel when VM is not defined
This commit is contained in:
parent
aac1b1fef3
commit
1f6a7d47b0
@ -109,12 +109,16 @@ class VMwareDriver
|
||||
# Cancels & undefine the VM #
|
||||
# ------------------------------------------------------------------------ #
|
||||
def cancel(deploy_id)
|
||||
# Destroy the VM
|
||||
rc, info = do_action("virsh -c #{@uri} destroy #{deploy_id}")
|
||||
rc, info = do_action("virsh -c #{@uri} --readonly dominfo #{deploy_id}")
|
||||
|
||||
exit info if rc == false
|
||||
if rc
|
||||
# Destroy the VM
|
||||
rc, info = do_action("virsh -c #{@uri} destroy #{deploy_id}")
|
||||
|
||||
OpenNebula.log_debug("Successfully canceled domain #{deploy_id}.")
|
||||
exit info if rc == false
|
||||
|
||||
OpenNebula.log_debug("Successfully canceled domain #{deploy_id}.")
|
||||
end
|
||||
|
||||
# Undefine the VM
|
||||
undefine_domain(deploy_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user