Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
82d78359
authored
Sep 11, 2013
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor manager
parent
f4b82dc9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
circle/storage/models.py
+2
-1
circle/storage/tasks.py
+11
-13
No files found.
circle/storage/models.py
View file @
82d78359
...
@@ -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'
)
...
...
circle/storage/tasks.py
View file @
82d78359
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
(
filter
=
task_method
,
name
=
'storagedriver.create_disk'
)
def
create_disk
(
disk_desc
):
@celery.task
(
name
=
'storagedriver.create_disk'
)
def
create_disk
(
disk_desc
):
pass
pass
@celery.task
(
filter
=
task_method
,
name
=
'storagedriver.delete_disk'
)
def
delete_disk
(
json_data
):
@celery.task
(
name
=
'storagedriver.delete_disk'
)
# TODO review
def
delete_disk
(
json_data
):
pass
pass
@celery.task
(
filter
=
task_method
,
name
=
'storagedriver.get_disk'
)
def
get_disk
(
json_data
):
@celery.task
(
name
=
'storagedriver.get_disk'
)
# TODO review
def
get_disk
(
json_data
):
pass
pass
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment