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
54080b7a
authored
Mar 11, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
instance: added proper resultant_state
parent
2b0eb332
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
circle/vm/models/instance.py
+5
-1
No files found.
circle/vm/models/instance.py
View file @
54080b7a
...
...
@@ -761,8 +761,12 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
def
shut_off
(
self
,
user
=
None
,
task_uuid
=
None
):
"""Shut off VM. (plug-out)
"""
def
__on_commit
(
activity
):
activity
.
resultant_state
=
'STOPPED'
with
instance_activity
(
code_suffix
=
'shut_off'
,
instance
=
self
,
task_uuid
=
task_uuid
,
user
=
user
)
as
act
:
task_uuid
=
task_uuid
,
user
=
user
,
on_commit
=
__on_commit
)
as
act
:
# Destroy VM
if
self
.
node
:
self
.
__destroy_vm
(
act
)
...
...
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