Commit 82d78359 by Guba Sándor

refactor manager

parent f4b82dc9
......@@ -18,7 +18,8 @@ class DataStore(models.Model):
verbose_name=_('name'))
path = models.CharField(max_length=200, unique=True,
verbose_name=_('path'))
hostname = models.CharField(max_length=40, unique=True,
verbose_name=_('hostname'))
class Meta:
ordering = ['name']
verbose_name = _('datastore')
......
import celery
from celery.contrib.methods import task_method
import logging
logger = logging.getLogger(__name__)
class StorageDriver:
@celery.task(filter=task_method, name='storagedriver.list_disks')
def list_disks(dir):
@celery.task(name='storagedriver.list_disks')
def list_disks(dir):
pass
@celery.task(filter=task_method, name='storagedriver.create_disk')
def create_disk(disk_desc):
@celery.task(name='storagedriver.create_disk')
def create_disk(disk_desc):
pass
@celery.task(filter=task_method, name='storagedriver.delete_disk')
def delete_disk(json_data):
# TODO review
@celery.task(name='storagedriver.delete_disk')
def delete_disk(json_data):
pass
@celery.task(filter=task_method, name='storagedriver.get_disk')
def get_disk(json_data):
# TODO review
@celery.task(name='storagedriver.get_disk')
def get_disk(json_data):
pass
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