Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
85f1f63a
authored
Sep 27, 2013
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: fix deploy parameters
parent
ec9df20c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
circle/storage/models.py
+4
-3
circle/storage/tasks/local_tasks.py
+1
-3
No files found.
circle/storage/models.py
View file @
85f1f63a
...
@@ -124,7 +124,7 @@ class Disk(TimeStampedModel):
...
@@ -124,7 +124,7 @@ class Disk(TimeStampedModel):
self
.
size
=
self
.
base
.
size
self
.
size
=
self
.
base
.
size
super
(
Disk
,
self
)
.
clean
(
*
args
,
**
kwargs
)
super
(
Disk
,
self
)
.
clean
(
*
args
,
**
kwargs
)
def
deploy
(
self
):
def
deploy
(
self
,
user
=
None
,
task_uuid
=
None
):
"""Reify the disk model on the associated data store.
"""Reify the disk model on the associated data store.
:param self: the disk model to reify
:param self: the disk model to reify
...
@@ -159,10 +159,11 @@ class Disk(TimeStampedModel):
...
@@ -159,10 +159,11 @@ class Disk(TimeStampedModel):
self
.
save
()
self
.
save
()
return
True
return
True
def
deploy_async
(
self
):
def
deploy_async
(
self
,
user
=
None
):
"""Execute deploy asynchronously.
"""Execute deploy asynchronously.
"""
"""
local_tasks
.
deploy
.
apply_async
(
self
)
local_tasks
.
deploy
.
apply_async
(
args
=
[
self
,
user
],
queue
=
"localhost.man"
)
def
delete
(
self
):
def
delete
(
self
):
# TODO
# TODO
...
...
circle/storage/tasks/local_tasks.py
View file @
85f1f63a
...
@@ -3,9 +3,7 @@ from manager.mancelery import celery
...
@@ -3,9 +3,7 @@ from manager.mancelery import celery
@celery.task
@celery.task
def
deploy
(
disk
,
user
):
def
deploy
(
disk
,
user
):
'''Create new virtual machine from VM class.
disk
.
deploy
(
task_uuid
=
deploy
.
request
.
id
,
user
=
user
)
'''
disk
.
deploy
(
task_uuid
=
deploy
.
rdiskd
,
user
=
user
)
@celery.task
@celery.task
...
...
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