Commit b56c2abc by Guba Sándor

instance: fix destroy and deploy return value

parent 432fb373
...@@ -607,9 +607,10 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel): ...@@ -607,9 +607,10 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
queue_name = self.get_remote_queue_name('vm') queue_name = self.get_remote_queue_name('vm')
# Deploy VM on remote machine # Deploy VM on remote machine
with act.sub_activity('deploying_vm'): with act.sub_activity('deploying_vm') as deploy_act:
vm_tasks.deploy.apply_async(args=[self.get_vm_desc()], deploy_act.result = vm_tasks.deploy.apply_async(
queue=queue_name).get(timeout=timeout) args=[self.get_vm_desc()],
queue=queue_name).get(timeout=timeout)
# Estabilish network connection (vmdriver) # Estabilish network connection (vmdriver)
with act.sub_activity('deploying_net'): with act.sub_activity('deploying_net'):
...@@ -671,7 +672,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel): ...@@ -671,7 +672,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
return local_tasks.deploy.apply_async(args=[self, user], return local_tasks.deploy.apply_async(args=[self, user],
queue="localhost.man") queue="localhost.man")
def __destroy_vm(self, act, timeout): def __destroy_vm(self, act, timeout=15):
"""Destroy the virtual machine and its associated networks. """Destroy the virtual machine and its associated networks.
:param self: The virtual machine. :param self: The virtual machine.
......
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