Commit 85f1f63a by Dudás Ádám

storage: fix deploy parameters

parent ec9df20c
...@@ -124,7 +124,7 @@ class Disk(TimeStampedModel): ...@@ -124,7 +124,7 @@ class Disk(TimeStampedModel):
self.size = self.base.size self.size = self.base.size
super(Disk, self).clean(*args, **kwargs) super(Disk, self).clean(*args, **kwargs)
def deploy(self): def deploy(self, user=None, task_uuid=None):
"""Reify the disk model on the associated data store. """Reify the disk model on the associated data store.
:param self: the disk model to reify :param self: the disk model to reify
...@@ -159,10 +159,11 @@ class Disk(TimeStampedModel): ...@@ -159,10 +159,11 @@ class Disk(TimeStampedModel):
self.save() self.save()
return True return True
def deploy_async(self): def deploy_async(self, user=None):
"""Execute deploy asynchronously. """Execute deploy asynchronously.
""" """
local_tasks.deploy.apply_async(self) local_tasks.deploy.apply_async(args=[self, user],
queue="localhost.man")
def delete(self): def delete(self):
# TODO # TODO
......
...@@ -3,9 +3,7 @@ from manager.mancelery import celery ...@@ -3,9 +3,7 @@ from manager.mancelery import celery
@celery.task @celery.task
def deploy(disk, user): def deploy(disk, user):
'''Create new virtual machine from VM class. disk.deploy(task_uuid=deploy.request.id, user=user)
'''
disk.deploy(task_uuid=deploy.rdiskd, user=user)
@celery.task @celery.task
......
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