Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cb68e9b6
authored
May 11, 2014
by
Bach Dániel
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add NATIVE_OVS option
parent
a7537840
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
vm.py
+13
-2
No files found.
vm.py
View file @
cb68e9b6
import
lxml.etree
as
ET
from
os
import
getenv
NATIVE_OVS
=
getenv
(
'NATIVE_OVS'
)
==
'True'
# VM Instance class
...
...
@@ -248,7 +252,7 @@ class VMNetwork:
bridge
=
"cloud"
,
ipv4
=
None
,
ipv6
=
None
,
network_type
=
'ethernet'
,
network_type
=
None
,
virtual_port
=
None
,
model
=
'virtio'
,
QoS
=
None
,
...
...
@@ -256,11 +260,18 @@ class VMNetwork:
managed
=
False
):
self
.
name
=
name
self
.
bridge
=
bridge
self
.
network_type
=
network_type
self
.
mac
=
mac
self
.
ipv4
=
ipv4
self
.
ipv6
=
ipv6
self
.
model
=
model
if
not
network_type
:
if
NATIVE_OVS
:
self
.
network_type
=
'bridge'
,
self
.
virtual_port
=
'openvswitch'
,
else
:
self
.
network_type
=
'ethernet'
else
:
self
.
network_type
=
network_type
self
.
virtual_port
=
virtual_port
self
.
QoS
=
QoS
self
.
vlan
=
vlan
...
...
Kramer András
@kramer.andras
commented
May 15, 2014
Reporter
Add it to the virtualenv too, otherwise it's not really working :--|
Add it to the virtualenv too, otherwise it's not really working :--|
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