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
bf9231ac
authored
Mar 12, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
instance: added sub_activity to save_as
parent
5970aee7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
circle/vm/models/instance.py
+6
-6
No files found.
circle/vm/models/instance.py
View file @
bf9231ac
...
...
@@ -975,7 +975,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
def
save_as_template
(
self
,
name
,
task_uuid
=
None
,
user
=
None
,
timeout
=
300
,
**
kwargs
):
with
instance_activity
(
code_suffix
=
"save_as_template"
,
instance
=
self
,
task_uuid
=
task_uuid
,
user
=
user
):
task_uuid
=
task_uuid
,
user
=
user
)
as
act
:
# prepare parameters
kwargs
.
setdefault
(
'name'
,
name
)
kwargs
.
setdefault
(
'description'
,
self
.
description
)
...
...
@@ -1000,12 +1000,12 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
# create template and do additional setup
tmpl
=
InstanceTemplate
(
**
kwargs
)
tmpl
.
full_clean
()
logger
.
info
(
"Clean utani save"
)
tmpl
.
full_clean
()
# Avoiding database errors.
tmpl
.
save
()
tmpl
.
disks
.
add
(
*
[
__try_save_disk
(
disk
)
for
disk
in
self
.
disks
.
all
()])
# save template
with
act
.
sub_activity
(
'saving_disks'
):
tmpl
.
disks
.
add
(
*
[
__try_save_disk
(
disk
)
for
disk
in
self
.
disks
.
all
()])
# save template
tmpl
.
save
()
try
:
# create interface templates
...
...
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