Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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):
...
@@ -46,6 +46,14 @@ class Operation(object):
abortable
=
False
abortable
=
False
has_percentage
=
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
):
def
__call__
(
self
,
**
kwargs
):
return
self
.
call
(
**
kwargs
)
return
self
.
call
(
**
kwargs
)
...
...
circle/vm/operations.py
View file @
19cdda94
...
@@ -56,7 +56,7 @@ class RemoteOperationMixin(object):
...
@@ -56,7 +56,7 @@ class RemoteOperationMixin(object):
remote_timeout
=
30
remote_timeout
=
30
def
_operation
(
self
,
**
kwargs
):
def
_operation
(
self
,
**
kwargs
):
args
=
self
.
_get_remote_args
(
**
kwargs
)
,
args
=
self
.
_get_remote_args
(
**
kwargs
)
return
self
.
task
.
apply_async
(
return
self
.
task
.
apply_async
(
args
=
args
,
queue
=
self
.
_get_remote_queue
()
args
=
args
,
queue
=
self
.
_get_remote_queue
()
)
.
get
(
timeout
=
self
.
remote_timeout
)
)
.
get
(
timeout
=
self
.
remote_timeout
)
...
@@ -92,7 +92,6 @@ class InstanceOperation(Operation):
...
@@ -92,7 +92,6 @@ class InstanceOperation(Operation):
accept_states
=
None
accept_states
=
None
deny_states
=
None
deny_states
=
None
resultant_state
=
None
resultant_state
=
None
activity_code_suffix
=
property
(
lambda
self
:
self
.
id
)
def
__init__
(
self
,
instance
):
def
__init__
(
self
,
instance
):
super
(
InstanceOperation
,
self
)
.
__init__
(
subject
=
instance
)
super
(
InstanceOperation
,
self
)
.
__init__
(
subject
=
instance
)
...
@@ -358,10 +357,10 @@ class DeployOperation(InstanceOperation):
...
@@ -358,10 +357,10 @@ class DeployOperation(InstanceOperation):
"wait operating system loading"
),
interruptible
=
True
)
"wait operating system loading"
),
interruptible
=
True
)
@register_operation
@register_operation
class
DeployVmOperation
(
SubOperationMixin
,
InstanceOperation
):
class
DeployVmOperation
(
SubOperationMixin
,
Remote
InstanceOperation
):
id
=
"_deploy_vm"
id
=
"_deploy_vm"
name
=
_
(
"deploy vm"
)
name
=
_
(
"deploy vm"
)
description
=
_
(
"Deploy
all associated disks
."
)
description
=
_
(
"Deploy
virtual machine
."
)
remote_queue
=
(
"vm"
,
"slow"
)
remote_queue
=
(
"vm"
,
"slow"
)
task
=
vm_tasks
.
deploy
task
=
vm_tasks
.
deploy
...
@@ -392,7 +391,7 @@ class DeployOperation(InstanceOperation):
...
@@ -392,7 +391,7 @@ class DeployOperation(InstanceOperation):
# deploy disk
# deploy disk
disk
.
deploy
()
disk
.
deploy
()
class
ResumeVmOperation
(
SubOperationMixin
,
InstanceOperation
):
class
ResumeVmOperation
(
SubOperationMixin
,
Remote
InstanceOperation
):
id
=
"_resume_vm"
id
=
"_resume_vm"
name
=
_
(
"boot virtual machine"
)
name
=
_
(
"boot virtual machine"
)
remote_queue
=
(
"vm"
,
"slow"
)
remote_queue
=
(
"vm"
,
"slow"
)
...
@@ -918,7 +917,6 @@ class NodeOperation(Operation):
...
@@ -918,7 +917,6 @@ class NodeOperation(Operation):
host_cls
=
Node
host_cls
=
Node
online_required
=
True
online_required
=
True
superuser_required
=
True
superuser_required
=
True
activity_code_suffix
=
property
(
lambda
self
:
self
.
id
)
def
__init__
(
self
,
node
):
def
__init__
(
self
,
node
):
super
(
NodeOperation
,
self
)
.
__init__
(
subject
=
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