tasks.py 588 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
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():
        pass

    @celery.task(filter=task_method, name='storagedriver.create_disk')
    def create_disk(json_data):
        pass

    @celery.task(filter=task_method, name='storagedriver.delete_disk')
    def delete_disk(json_data):
        pass

    @celery.task(filter=task_method, name='storagedriver.get_disk')
    def get_disk(json_data):
        pass