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
8c7219d6
authored
Oct 02, 2013
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fixing Instance create_from_template
parent
cb9a7a5b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
circle/vm/models.py
+6
-3
No files found.
circle/vm/models.py
View file @
8c7219d6
...
...
@@ -358,11 +358,14 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
inst
.
disks
.
add
(
disk
.
get_exclusive
())
# create related entities
for
iftmpl
in
template
.
interface_set
.
all
():
i
=
Interface
.
create_from_template
(
instance
=
inst
,
template
=
iftmpl
)
i
=
Interface
.
create_from_template
(
instance
=
inst
,
template
=
iftmpl
,
owner
=
owner
)
if
i
.
host
:
i
.
host
.
enable_net
()
port
,
proto
=
ACCESS_PROTOCOLS
[
i
.
access_method
][
1
:
3
]
i
.
host
.
add_port
(
proto
,
i
.
get_port
(),
port
)
port
,
proto
=
ACCESS_PROTOCOLS
[
i
.
instance
.
access_method
][
1
:
3
]
# TODO fix this port fw
i
.
host
.
add_port
(
proto
,
private
=
port
)
return
inst
...
...
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