Commit e20f846e by Dudás Ádám

vm: fix function's name (remove -> destroy)

parent b2fa4241
......@@ -581,14 +581,17 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
act.started = timezone.now()
act.task_uuid = task_uuid
act.save()
# Destroy networks
act.update_state('DESTROYING NET')
for net in self.interface_set.all():
net.destroy()
# Destroy virtual machine
act.update_state('DESTROYING VM')
queue_name = self.get_remote_queue_name('vm')
vm_tasks.destroy.apply_async(args=[self.vm_name],
queue=queue_name).get()
# Delete networks
for net in self.interface_set.all():
net.remove()
act.finish(result="SUCCESS")
......
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