Commit 00227f21 by Bach Dániel

vm: fix destroy_net in DestroyOperation

parent fdd67076
...@@ -217,12 +217,13 @@ class DestroyOperation(InstanceOperation): ...@@ -217,12 +217,13 @@ class DestroyOperation(InstanceOperation):
activity.resultant_state = 'DESTROYED' activity.resultant_state = 'DESTROYED'
def _operation(self, activity): def _operation(self, activity):
if self.instance.node:
# Destroy networks # Destroy networks
with activity.sub_activity('destroying_net'): with activity.sub_activity('destroying_net'):
if self.instance.node:
self.instance.shutdown_net() self.instance.shutdown_net()
self.instance.destroy_net() self.instance.destroy_net()
if self.instance.node:
# Delete virtual machine # Delete virtual machine
with activity.sub_activity('destroying_vm'): with activity.sub_activity('destroying_vm'):
self.instance.delete_vm() self.instance.delete_vm()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment