Commit 82d78359 by Guba Sándor

refactor manager

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