mirror of
https://git.proxmox.com/git/mirror_ifupdown2
synced 2025-08-15 09:50:27 +00:00
Merge pull request #246 from aderumier/ovsfakebridge2
addons: openvswitch : add support for fakebridge.
This commit is contained in:
commit
a1bf8ffe5a
@ -74,6 +74,10 @@ class openvswitch(Addon, moduleBase):
|
|||||||
"required": False,
|
"required": False,
|
||||||
"example": ["ovs-ports-condone-regex ^[a-zA-Z0-9]+_v[0-9]{1,4}$"]
|
"example": ["ovs-ports-condone-regex ^[a-zA-Z0-9]+_v[0-9]{1,4}$"]
|
||||||
},
|
},
|
||||||
|
'ovs-bridge': {
|
||||||
|
'help': 'Optional parent bridge for fake bridges',
|
||||||
|
'required': False,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,13 +151,17 @@ class openvswitch(Addon, moduleBase):
|
|||||||
ovsextra = ifaceobj.get_attr_value('ovs-extra')
|
ovsextra = ifaceobj.get_attr_value('ovs-extra')
|
||||||
ovsmtu = ifaceobj.get_attr_value_first ('ovs-mtu')
|
ovsmtu = ifaceobj.get_attr_value_first ('ovs-mtu')
|
||||||
ovsportscondoneregex = self._get_ovs_port_condone_regex(ifaceobj)
|
ovsportscondoneregex = self._get_ovs_port_condone_regex(ifaceobj)
|
||||||
|
ovsparent = ifaceobj.get_attr_value_first ('ovs-bridge')
|
||||||
|
|
||||||
cmd_list = []
|
cmd_list = []
|
||||||
|
|
||||||
cmd = "--may-exist add-br %s"%(iface)
|
cmd = "--may-exist add-br %s"%(iface)
|
||||||
|
if ovsparent is not None and ovsoptions:
|
||||||
|
cmd = cmd + " %s" %(ovsoptions)
|
||||||
|
|
||||||
cmd_list.append(cmd)
|
cmd_list.append(cmd)
|
||||||
|
|
||||||
if ovsoptions:
|
if ovsparent is None and ovsoptions:
|
||||||
cmd = "set bridge %s %s" %(iface, ovsoptions)
|
cmd = "set bridge %s %s" %(iface, ovsoptions)
|
||||||
cmd_list.append(cmd)
|
cmd_list.append(cmd)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user