Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
circle/vm/models/instance.py
+3
-5
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
()
with
act
.
sub_activity
(
'saving_disks'
):
tmpl
.
disks
.
add
(
*
[
__try_save_disk
(
disk
)
for
disk
in
self
.
disks
.
all
()])
# save template
tmpl
.
save
()
try
:
try
:
with
act
.
sub_activity
(
'saving_disks'
):
tmpl
.
disks
.
add
(
*
[
__try_save_disk
(
disk
)
for
disk
in
self
.
disks
.
all
()])
# 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