Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e7abb4a5
authored
May 06, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: make save_as.shutdown abortable
parent
40c82261
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
circle/vm/operations.py
+3
-2
No files found.
circle/vm/operations.py
View file @
e7abb4a5
...
@@ -240,6 +240,7 @@ class SaveAsTemplateOperation(InstanceOperation):
...
@@ -240,6 +240,7 @@ class SaveAsTemplateOperation(InstanceOperation):
Template can be shared with groups and users.
Template can be shared with groups and users.
Users can instantiate Virtual Machines from Templates.
Users can instantiate Virtual Machines from Templates.
"""
)
"""
)
abortable
=
True
@staticmethod
@staticmethod
def
_rename
(
name
):
def
_rename
(
name
):
...
@@ -252,11 +253,11 @@ class SaveAsTemplateOperation(InstanceOperation):
...
@@ -252,11 +253,11 @@ class SaveAsTemplateOperation(InstanceOperation):
return
"
%
s v
%
d"
%
(
name
,
v
)
return
"
%
s v
%
d"
%
(
name
,
v
)
def
_operation
(
self
,
activity
,
user
,
system
,
timeout
=
300
,
def
_operation
(
self
,
activity
,
user
,
system
,
timeout
=
300
,
with_shutdown
=
True
,
**
kwargs
):
with_shutdown
=
True
,
task
=
None
,
**
kwargs
):
if
with_shutdown
:
if
with_shutdown
:
try
:
try
:
ShutdownOperation
(
self
.
instance
)
.
call
(
parent_activity
=
activity
,
ShutdownOperation
(
self
.
instance
)
.
call
(
parent_activity
=
activity
,
user
=
user
)
user
=
user
,
task
=
task
)
except
Instance
.
WrongStateError
:
except
Instance
.
WrongStateError
:
pass
pass
...
...
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