Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
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
Hide 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):
...
@@ -358,11 +358,14 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
inst
.
disks
.
add
(
disk
.
get_exclusive
())
inst
.
disks
.
add
(
disk
.
get_exclusive
())
# create related entities
# create related entities
for
iftmpl
in
template
.
interface_set
.
all
():
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
:
if
i
.
host
:
i
.
host
.
enable_net
()
i
.
host
.
enable_net
()
port
,
proto
=
ACCESS_PROTOCOLS
[
i
.
access_method
][
1
:
3
]
port
,
proto
=
ACCESS_PROTOCOLS
[
i
.
instance
.
access_method
][
1
:
3
]
i
.
host
.
add_port
(
proto
,
i
.
get_port
(),
port
)
# TODO fix this port fw
i
.
host
.
add_port
(
proto
,
private
=
port
)
return
inst
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