Commit cb68e9b6 by Bach Dániel

add NATIVE_OVS option

parent a7537840
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment