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
24872266
authored
Mar 20, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
instance: fixed save_as rollback on failure
parent
586d86e0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
+1
-3
circle/vm/models/instance.py
+1
-3
No files found.
circle/vm/models/instance.py
View file @
24872266
...
@@ -1155,12 +1155,10 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel,
...
@@ -1155,12 +1155,10 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel,
tmpl
=
InstanceTemplate
(
**
params
)
tmpl
=
InstanceTemplate
(
**
params
)
tmpl
.
full_clean
()
# Avoiding database errors.
tmpl
.
full_clean
()
# Avoiding database errors.
tmpl
.
save
()
tmpl
.
save
()
try
:
with
act
.
sub_activity
(
'saving_disks'
):
with
act
.
sub_activity
(
'saving_disks'
):
tmpl
.
disks
.
add
(
*
[
__try_save_disk
(
disk
)
tmpl
.
disks
.
add
(
*
[
__try_save_disk
(
disk
)
for
disk
in
self
.
disks
.
all
()])
for
disk
in
self
.
disks
.
all
()])
# save template
tmpl
.
save
()
try
:
# create interface templates
# create interface templates
for
i
in
self
.
interface_set
.
all
():
for
i
in
self
.
interface_set
.
all
():
i
.
save_as_template
(
tmpl
)
i
.
save_as_template
(
tmpl
)
...
...
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