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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
circle/vm/models/instance.py
+3
-3
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,9 +1000,9 @@ 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
()
with
act
.
sub_activity
(
'saving_disks'
):
tmpl
.
disks
.
add
(
*
[
__try_save_disk
(
disk
)
for
disk
in
self
.
disks
.
all
()])
# save template
...
...
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