Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
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
b6ba0036
authored
Mar 23, 2014
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: use operations
parent
48dcff49
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
64 deletions
+2
-64
circle/vm/models/__init__.py
+2
-1
circle/vm/models/instance.py
+0
-0
circle/vm/tasks/local_tasks.py
+0
-63
No files found.
circle/vm/models/__init__.py
View file @
b6ba0036
...
...
@@ -16,11 +16,12 @@ from .instance import pre_state_changed
from
.network
import
InterfaceTemplate
from
.network
import
Interface
from
.node
import
Node
from
.operation
import
Operation
__all__
=
[
'InstanceActivity'
,
'InstanceActiveManager'
,
'BaseResourceConfigModel'
,
'NamedBaseResourceConfig'
,
'VirtualMachineDescModel'
,
'InstanceTemplate'
,
'Instance'
,
'instance_activity'
,
'post_state_changed'
,
'pre_state_changed'
,
'InterfaceTemplate'
,
'Interface'
,
'Trait'
,
'Node'
,
'NodeActivity'
,
'Lease'
,
'node_activity'
,
'node_activity'
,
'Operation'
,
]
circle/vm/models/instance.py
View file @
b6ba0036
This diff is collapsed.
Click to expand it.
circle/vm/tasks/local_tasks.py
View file @
b6ba0036
...
...
@@ -13,66 +13,3 @@ def async_operation(operation_id, instance_pk, activity_pk, **kwargs):
activity
.
save
()
return
operation
.
_exec_op
(
activity
=
activity
,
**
kwargs
)
# TODO: Keep synchronised with Instance funcs
@celery.task
def
deploy
(
instance
,
user
):
instance
.
deploy
(
task_uuid
=
deploy
.
request
.
id
,
user
=
user
)
@celery.task
def
redeploy
(
instance
,
user
):
instance
.
redeploy
(
task_uuid
=
redeploy
.
request
.
id
,
user
=
user
)
@celery.task
def
shut_off
(
instance
,
user
):
instance
.
shut_off
(
task_uuid
=
shut_off
.
request
.
id
,
user
=
user
)
@celery.task
def
destroy
(
instance
,
user
):
instance
.
destroy
(
task_uuid
=
destroy
.
request
.
id
,
user
=
user
)
@celery.task
def
save_as_template
(
instance
,
name
,
user
,
params
):
instance
.
save_as_template
(
name
,
task_uuid
=
save_as_template
.
request
.
id
,
user
=
user
,
**
params
)
@celery.task
def
sleep
(
instance
,
user
):
instance
.
sleep
(
task_uuid
=
sleep
.
request
.
id
,
user
=
user
)
@celery.task
def
wake_up
(
instance
,
user
):
instance
.
wake_up
(
task_uuid
=
wake_up
.
request
.
id
,
user
=
user
)
@celery.task
def
shutdown
(
instance
,
user
):
instance
.
shutdown
(
task_uuid
=
shutdown
.
request
.
id
,
user
=
user
)
@celery.task
def
reset
(
instance
,
user
):
instance
.
reset
(
task_uuid
=
reset
.
request
.
id
,
user
=
user
)
@celery.task
def
reboot
(
instance
,
user
):
instance
.
reboot
(
task_uuid
=
reboot
.
request
.
id
,
user
=
user
)
@celery.task
def
migrate
(
instance
,
to_node
,
user
):
instance
.
migrate
(
to_node
,
task_uuid
=
migrate
.
request
.
id
,
user
=
user
)
@celery.task
def
flush
(
node
,
user
):
node
.
flush
(
task_uuid
=
flush
.
request
.
id
,
user
=
user
)
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