Commit be0f030f by Guba Sándor

storage/local_task: added create_empty and clone tasks

parent a3b06b7d
...@@ -28,6 +28,12 @@ def save_as(disk, timeout, user): ...@@ -28,6 +28,12 @@ def save_as(disk, timeout, user):
@celery.task @celery.task
def clone(disk, new_disk, timeout, user):
disk.clone(task_uuid=save_as.request.id, user=user,
disk=new_disk, timeout=timeout)
@celery.task
def deploy(disk, user): def deploy(disk, user):
disk.deploy(task_uuid=deploy.request.id, user=user) disk.deploy(task_uuid=deploy.request.id, user=user)
...@@ -57,6 +63,7 @@ create_from_url = CreateFromURLTask() ...@@ -57,6 +63,7 @@ create_from_url = CreateFromURLTask()
@celery.task @celery.task
def create_empty(Disk, instance, params, user): def create_empty(Disk, instance, user, params):
Disk.create_empty(instance, params, user, Disk.create_empty(instance, user,
task_uuid=create_empty.request.id) task_uuid=create_empty.request.id,
**params)
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