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
b7bebad6
authored
Oct 07, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix suboperation calls in {Destroy,Sleep}Operation (add missing system arg) (quickfix)
parent
ca7c9f59
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
circle/vm/operations.py
+6
-5
No files found.
circle/vm/operations.py
View file @
b7bebad6
...
@@ -405,7 +405,7 @@ class DestroyOperation(InstanceOperation):
...
@@ -405,7 +405,7 @@ class DestroyOperation(InstanceOperation):
required_perms
=
()
required_perms
=
()
resultant_state
=
'DESTROYED'
resultant_state
=
'DESTROYED'
def
_operation
(
self
,
activity
):
def
_operation
(
self
,
activity
,
system
):
# Destroy networks
# Destroy networks
with
activity
.
sub_activity
(
with
activity
.
sub_activity
(
'destroying_net'
,
'destroying_net'
,
...
@@ -415,7 +415,7 @@ class DestroyOperation(InstanceOperation):
...
@@ -415,7 +415,7 @@ class DestroyOperation(InstanceOperation):
self
.
instance
.
destroy_net
()
self
.
instance
.
destroy_net
()
if
self
.
instance
.
node
:
if
self
.
instance
.
node
:
self
.
instance
.
_delete_vm
(
parent_activity
=
activity
)
self
.
instance
.
_delete_vm
(
parent_activity
=
activity
,
system
=
system
)
# Destroy disks
# Destroy disks
with
activity
.
sub_activity
(
with
activity
.
sub_activity
(
...
@@ -425,7 +425,8 @@ class DestroyOperation(InstanceOperation):
...
@@ -425,7 +425,8 @@ class DestroyOperation(InstanceOperation):
# Delete mem. dump if exists
# Delete mem. dump if exists
try
:
try
:
self
.
instance
.
_delete_mem_dump
(
parent_activity
=
activity
)
self
.
instance
.
_delete_mem_dump
(
parent_activity
=
activity
,
system
=
system
)
except
:
except
:
pass
pass
...
@@ -779,12 +780,12 @@ class SleepOperation(InstanceOperation):
...
@@ -779,12 +780,12 @@ class SleepOperation(InstanceOperation):
else
:
else
:
activity
.
resultant_state
=
'ERROR'
activity
.
resultant_state
=
'ERROR'
def
_operation
(
self
,
activity
):
def
_operation
(
self
,
activity
,
system
):
with
activity
.
sub_activity
(
'shutdown_net'
,
with
activity
.
sub_activity
(
'shutdown_net'
,
readable_name
=
ugettext_noop
(
readable_name
=
ugettext_noop
(
"shutdown network"
)):
"shutdown network"
)):
self
.
instance
.
shutdown_net
()
self
.
instance
.
shutdown_net
()
self
.
instance
.
_suspend_vm
(
parent_activity
=
activity
)
self
.
instance
.
_suspend_vm
(
parent_activity
=
activity
,
system
=
system
)
self
.
instance
.
yield_node
()
self
.
instance
.
yield_node
()
@register_operation
@register_operation
...
...
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