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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
6c725c6d
authored
Jul 21, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
operation: added ChangeStateOperation
parent
b4b966f0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
circle/vm/operations.py
+16
-0
No files found.
circle/vm/operations.py
View file @
6c725c6d
...
@@ -638,6 +638,22 @@ class RenewOperation(InstanceOperation):
...
@@ -638,6 +638,22 @@ class RenewOperation(InstanceOperation):
register_operation
(
RenewOperation
)
register_operation
(
RenewOperation
)
class
ChangeStateOperation
(
InstanceOperation
):
activity_code_suffix
=
'change_state'
id
=
'change_state'
name
=
_
(
"change state"
)
description
=
_
(
"Change the virtual machine state to NOSTATE"
)
acl_level
=
"owner"
required_perms
=
(
'vm.change_state'
,
)
def
_operation
(
self
,
user
,
activity
,
new_state
=
"NOSTATE"
,
reason
=
None
,
lease
=
None
):
activity
.
resultant_state
=
new_state
register_operation
(
ChangeStateOperation
)
class
NodeOperation
(
Operation
):
class
NodeOperation
(
Operation
):
async_operation
=
abortable_async_node_operation
async_operation
=
abortable_async_node_operation
host_cls
=
Node
host_cls
=
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