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='') queue='')
def restore(self, user=None, task_uuid=None):
"""Restore removed disk.
def restore_async(self, user=None):
local_tasks.restore.apply_async(args=[self, user],
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(, user=user) disk.remove(, user=user)
def restore(disk, user):
disk.restore(, 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