Commit 49173ff9 by Dudás Ádám

storage: add stubs for restore functionality

parent aec82004
...@@ -189,6 +189,16 @@ class Disk(TimeStampedModel): ...@@ -189,6 +189,16 @@ class Disk(TimeStampedModel):
local_tasks.remove.apply_async(args=[self, user], local_tasks.remove.apply_async(args=[self, user],
queue='localhost.man') queue='localhost.man')
def restore(self, user=None, task_uuid=None):
"""Restore removed disk.
"""
# TODO
pass
def restore_async(self, user=None):
local_tasks.restore.apply_async(args=[self, user],
queue='localhost.man')
class DiskActivity(TimeStampedModel): class DiskActivity(TimeStampedModel):
activity_code = CharField(verbose_name=_('activity_code'), max_length=100) activity_code = CharField(verbose_name=_('activity_code'), max_length=100)
......
...@@ -9,3 +9,8 @@ def deploy(disk, user): ...@@ -9,3 +9,8 @@ def deploy(disk, user):
@celery.task @celery.task
def remove(disk, user): def remove(disk, user):
disk.remove(task_uuid=remove.request.id, user=user) disk.remove(task_uuid=remove.request.id, user=user)
@celery.task
def restore(disk, user):
disk.restore(task_uuid=restore.request.id, user=user)
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