Merge "Sync dhcp_agent.ini with the codes"
This commit is contained in:
commit
e7b13fe3e9
@ -15,6 +15,9 @@
|
|||||||
# BigSwitch/Floodlight)
|
# BigSwitch/Floodlight)
|
||||||
# interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
|
# interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
|
||||||
|
|
||||||
|
# Name of Open vSwitch bridge to use
|
||||||
|
# ovs_integration_bridge = br-int
|
||||||
|
|
||||||
# Use veth for an OVS interface or not.
|
# Use veth for an OVS interface or not.
|
||||||
# Support kernels with limited namespace support
|
# Support kernels with limited namespace support
|
||||||
# (e.g. RHEL 6.5) so long as ovs_use_veth is set to True.
|
# (e.g. RHEL 6.5) so long as ovs_use_veth is set to True.
|
||||||
|
@ -111,6 +111,31 @@ class TestOVSInterfaceDriver(TestBase):
|
|||||||
def test_plug_alt_bridge(self):
|
def test_plug_alt_bridge(self):
|
||||||
self._test_plug(bridge='br-foo')
|
self._test_plug(bridge='br-foo')
|
||||||
|
|
||||||
|
def test_plug_configured_bridge(self):
|
||||||
|
br = 'br-v'
|
||||||
|
self.conf.set_override('ovs_use_veth', False)
|
||||||
|
self.conf.set_override('ovs_integration_bridge', br)
|
||||||
|
self.assertEqual(self.conf.ovs_integration_bridge, br)
|
||||||
|
|
||||||
|
def device_exists(dev, root_helper=None, namespace=None):
|
||||||
|
return dev == br
|
||||||
|
|
||||||
|
ovs = interface.OVSInterfaceDriver(self.conf)
|
||||||
|
with mock.patch.object(ovs, '_ovs_add_port') as add_port:
|
||||||
|
self.device_exists.side_effect = device_exists
|
||||||
|
ovs.plug('01234567-1234-1234-99',
|
||||||
|
'port-1234',
|
||||||
|
'tap0',
|
||||||
|
'aa:bb:cc:dd:ee:ff',
|
||||||
|
bridge=None,
|
||||||
|
namespace=None)
|
||||||
|
|
||||||
|
add_port.assert_called_once_with('br-v',
|
||||||
|
'tap0',
|
||||||
|
'port-1234',
|
||||||
|
'aa:bb:cc:dd:ee:ff',
|
||||||
|
internal=True)
|
||||||
|
|
||||||
def _test_plug(self, additional_expectation=[], bridge=None,
|
def _test_plug(self, additional_expectation=[], bridge=None,
|
||||||
namespace=None):
|
namespace=None):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user