diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-08-26 09:53:51 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-08-26 09:53:51 +0000 |
commit | 6d046bca3c7c63993782ba6646ecdf530a643297 (patch) | |
tree | d8aacf95f1919949c1939da965b9712c2b8ab30b /os_net_config/tests/test_impl_ifcfg.py | |
parent | 4147c5a7a08dea9a054a1448e0314f8f276f2067 (diff) | |
parent | bb1fcc4e0dbfa2e575570d75d209c5308be41f6d (diff) |
Merge "Add support for OVS DPDK Bridge and Port"
Diffstat (limited to 'os_net_config/tests/test_impl_ifcfg.py')
-rw-r--r-- | os_net_config/tests/test_impl_ifcfg.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/os_net_config/tests/test_impl_ifcfg.py b/os_net_config/tests/test_impl_ifcfg.py index 9b24717..ad27d83 100644 --- a/os_net_config/tests/test_impl_ifcfg.py +++ b/os_net_config/tests/test_impl_ifcfg.py @@ -758,6 +758,36 @@ DNS2=5.6.7.8 """ self.assertEqual(em1_config, self.get_interface_config('em1')) + def test_network_ovs_dpdk_bridge_and_port(self): + interface = objects.Interface(name='eth1') + dpdk_port = objects.OvsDpdkPort(name='dpdk0', members=[interface]) + bridge = objects.OvsUserBridge('br-link', members=[dpdk_port]) + self.provider.add_interface(interface) + self.provider.add_interface(dpdk_port) + self.provider.add_bridge(bridge) + br_link_config = """# This file is autogenerated by os-net-config +DEVICE=br-link +ONBOOT=yes +HOTPLUG=no +NM_CONTROLLED=no +PEERDNS=no +DEVICETYPE=ovs +TYPE=OVSUserBridge +""" + dpdk0_config = """# This file is autogenerated by os-net-config +DEVICE=dpdk0 +ONBOOT=yes +HOTPLUG=no +NM_CONTROLLED=no +PEERDNS=no +DEVICETYPE=ovs +TYPE=OVSDPDKPort +OVS_BRIDGE=br-link +""" + self.assertEqual(br_link_config, + self.provider.bridge_data['br-link']) + self.assertEqual(dpdk0_config, self.get_interface_config('dpdk0')) + class TestIfcfgNetConfigApply(base.TestCase): |