tasks.py 635 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
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')
11
    def list_disks(dir):
12 13 14
        pass

    @celery.task(filter=task_method, name='storagedriver.create_disk')
15
    def create_disk(disk_desc):
16 17 18 19
        pass

    @celery.task(filter=task_method, name='storagedriver.delete_disk')
    def delete_disk(json_data):
20
        # TODO review
21 22 23 24
        pass

    @celery.task(filter=task_method, name='storagedriver.get_disk')
    def get_disk(json_data):
25
        # TODO review
26
        pass