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
2c2f2091
authored
Feb 03, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix InterfaceTemplate.create
parent
ac015c66
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
circle/vm/models/instance.py
+2
-7
circle/vm/models/network.py
+4
-0
No files found.
circle/vm/models/instance.py
View file @
2c2f2091
...
@@ -307,13 +307,8 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
...
@@ -307,13 +307,8 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
inst
.
disks
.
add
(
*
[
disk
.
get_exclusive
()
for
disk
in
disks
])
inst
.
disks
.
add
(
*
[
disk
.
get_exclusive
()
for
disk
in
disks
])
for
net
in
networks
:
for
net
in
networks
:
i
=
Interface
.
create
(
instance
=
inst
,
vlan
=
net
.
vlan
,
Interface
.
create
(
instance
=
inst
,
vlan
=
net
.
vlan
,
owner
=
inst
.
owner
,
managed
=
net
.
managed
)
owner
=
inst
.
owner
,
managed
=
net
.
managed
)
if
i
.
host
:
i
.
host
.
enable_net
()
port
,
proto
=
ACCESS_PROTOCOLS
[
i
.
instance
.
access_method
][
1
:
3
]
# TODO fix this port fw
i
.
host
.
add_port
(
proto
,
private
=
port
)
inst
.
req_traits
.
add
(
*
req_traits
)
inst
.
req_traits
.
add
(
*
req_traits
)
inst
.
tags
.
add
(
*
tags
)
inst
.
tags
.
add
(
*
tags
)
...
...
circle/vm/models/network.py
View file @
2c2f2091
...
@@ -121,6 +121,10 @@ class Interface(Model):
...
@@ -121,6 +121,10 @@ class Interface(Model):
host
.
pub_ipv4
=
vlan
.
snat_ip
host
.
pub_ipv4
=
vlan
.
snat_ip
host
.
full_clean
()
host
.
full_clean
()
host
.
save
()
host
.
save
()
host
.
enable_net
()
from
.instance
import
ACCESS_PROTOCOLS
port
,
proto
=
ACCESS_PROTOCOLS
[
instance
.
access_method
][
1
:
3
]
host
.
add_port
(
proto
,
private
=
port
)
else
:
else
:
host
=
None
host
=
None
...
...
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