Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
19cdda94
authored
Oct 01, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix typos
parent
a89d41d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
circle/common/operations.py
+8
-0
circle/vm/operations.py
+4
-6
No files found.
circle/common/operations.py
View file @
19cdda94
...
...
@@ -46,6 +46,14 @@ class Operation(object):
abortable
=
False
has_percentage
=
False
@property
def
activity_code_suffix
(
self
):
return
getattr
(
self
,
"_real_activity_code_suffix"
,
self
.
id
)
@activity_code_suffix.setter
def
activity_code_suffix
(
self
,
value
):
self
.
_real_activity_code_suffix
=
value
def
__call__
(
self
,
**
kwargs
):
return
self
.
call
(
**
kwargs
)
...
...
circle/vm/operations.py
View file @
19cdda94
...
...
@@ -56,7 +56,7 @@ class RemoteOperationMixin(object):
remote_timeout
=
30
def
_operation
(
self
,
**
kwargs
):
args
=
self
.
_get_remote_args
(
**
kwargs
)
,
args
=
self
.
_get_remote_args
(
**
kwargs
)
return
self
.
task
.
apply_async
(
args
=
args
,
queue
=
self
.
_get_remote_queue
()
)
.
get
(
timeout
=
self
.
remote_timeout
)
...
...
@@ -92,7 +92,6 @@ class InstanceOperation(Operation):
accept_states
=
None
deny_states
=
None
resultant_state
=
None
activity_code_suffix
=
property
(
lambda
self
:
self
.
id
)
def
__init__
(
self
,
instance
):
super
(
InstanceOperation
,
self
)
.
__init__
(
subject
=
instance
)
...
...
@@ -358,10 +357,10 @@ class DeployOperation(InstanceOperation):
"wait operating system loading"
),
interruptible
=
True
)
@register_operation
class
DeployVmOperation
(
SubOperationMixin
,
InstanceOperation
):
class
DeployVmOperation
(
SubOperationMixin
,
Remote
InstanceOperation
):
id
=
"_deploy_vm"
name
=
_
(
"deploy vm"
)
description
=
_
(
"Deploy
all associated disks
."
)
description
=
_
(
"Deploy
virtual machine
."
)
remote_queue
=
(
"vm"
,
"slow"
)
task
=
vm_tasks
.
deploy
...
...
@@ -392,7 +391,7 @@ class DeployOperation(InstanceOperation):
# deploy disk
disk
.
deploy
()
class
ResumeVmOperation
(
SubOperationMixin
,
InstanceOperation
):
class
ResumeVmOperation
(
SubOperationMixin
,
Remote
InstanceOperation
):
id
=
"_resume_vm"
name
=
_
(
"boot virtual machine"
)
remote_queue
=
(
"vm"
,
"slow"
)
...
...
@@ -918,7 +917,6 @@ class NodeOperation(Operation):
host_cls
=
Node
online_required
=
True
superuser_required
=
True
activity_code_suffix
=
property
(
lambda
self
:
self
.
id
)
def
__init__
(
self
,
node
):
super
(
NodeOperation
,
self
)
.
__init__
(
subject
=
node
)
...
...
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