summaryrefslogtreecommitdiffstats
path: root/os_net_config/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-03-17 18:32:17 +0000
committerGerrit Code Review <review@openstack.org>2016-03-17 18:32:17 +0000
commit4471875a6153eff1807233ef4ad23af7962bce41 (patch)
treeadeab6473c13012b960fb5ca74ceb0c8f4831e57 /os_net_config/tests
parent3b4a27a3ccb861cf2899ea1fae6c1cc160b38fd7 (diff)
parentb0b09a65b68fa0297538bfbcc40c15655617721e (diff)
Merge "Fix hierarchy for Linux Bonds and Linux Bridges"
Diffstat (limited to 'os_net_config/tests')
-rw-r--r--os_net_config/tests/test_impl_ifcfg.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/os_net_config/tests/test_impl_ifcfg.py b/os_net_config/tests/test_impl_ifcfg.py
index f92b0a6..3500e4c 100644
--- a/os_net_config/tests/test_impl_ifcfg.py
+++ b/os_net_config/tests/test_impl_ifcfg.py
@@ -178,6 +178,11 @@ OVS_OPTIONS="tag=5"
BOOTPROTO=none
"""
+_VLAN_LINUX_BRIDGE = _BASE_VLAN_OVS + """VLAN=yes
+BRIDGE=br-ctlplane
+BOOTPROTO=none
+"""
+
_OVS_BOND_DHCP = """# This file is autogenerated by os-net-config
DEVICE=bond0
@@ -447,6 +452,15 @@ class TestIfcfgNetConfig(base.TestCase):
self.provider.add_bridge(bridge)
self.assertEqual(_VLAN_OVS_BRIDGE, self.get_interface_config('vlan5'))
+ def test_add_linux_bridge_with_vlan(self):
+ vlan = objects.Vlan(None, 5)
+ bridge = objects.LinuxBridge('br-ctlplane', use_dhcp=True,
+ members=[vlan])
+ self.provider.add_vlan(vlan)
+ self.provider.add_bridge(bridge)
+ self.assertEqual(_VLAN_LINUX_BRIDGE,
+ self.get_interface_config('vlan5'))
+
def test_ovs_bond(self):
interface1 = objects.Interface('em1')
interface2 = objects.Interface('em2')