Commit 357402a5 by Guba Sándor

adding functional manager/celery

parent 1105ebab
......@@ -6,7 +6,7 @@ from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import post_delete
from model_utils.models import TimeStampedModel
from manager import storage_manager
from . import tasks
......@@ -99,7 +99,7 @@ class Disk(TimeStampedModel):
return u"%s (#%d)" % (,
def deploy_async(self):
def deploy(self):
"""Reify the disk model on the associated data store.
......@@ -115,14 +115,15 @@ class Disk(TimeStampedModel):
return False
disk_desc = {
'name': self.filename,
'dir': self.datastore.path,
'format': self.format,
'size': self.size,
'base_name': if self.base else None,
'type': self.type
'type': 'snapshot' if self.type == 'qcow2-snap' else 'normal'
args=[disk_desc], queue=self.datastore.hostname + ".storage").get()
self.ready = True
return True
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