Commit 8315e9dc by tarokkk

adding bridge to VMNetwork

parent 589cdc2f
...@@ -166,6 +166,7 @@ class VMNetwork: ...@@ -166,6 +166,7 @@ class VMNetwork:
''' Virtual Machine network representing class ''' Virtual Machine network representing class
name -- network device name name -- network device name
bridge -- bridg for the port
mac -- the MAC address of the quest interface mac -- the MAC address of the quest interface
vlan -- Port VLAN configuration vlan -- Port VLAN configuration
network_type -- need to be "ethernet" by default network_type -- need to be "ethernet" by default
...@@ -176,6 +177,7 @@ class VMNetwork: ...@@ -176,6 +177,7 @@ class VMNetwork:
''' '''
# Class attributes # Class attributes
name = None name = None
bridge = None
network_type = None network_type = None
mac = None mac = None
model = None model = None
...@@ -186,12 +188,14 @@ class VMNetwork: ...@@ -186,12 +188,14 @@ class VMNetwork:
def __init__(self, def __init__(self,
name, name,
bridge,
mac, mac,
network_type='ethernet', network_type='ethernet',
model='virtio', model='virtio',
QoS=None, QoS=None,
vlan=0): vlan=0):
self.name = name self.name = name
self.bridge = bridge
self.network_type = network_type self.network_type = network_type
self.mac = mac self.mac = mac
self.model = model self.model = model
......
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