aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/tests/test_impl_ifcfg.py
diff options
context:
space:
mode:
authorSaravanan KR <skramaja@redhat.com>2016-07-30 15:22:57 +0530
committerSaravanan KR <skramaja@redhat.com>2016-08-26 15:26:28 +0530
commit9108fcb7bb1fa10ffce2fd787278802ee3f3354c (patch)
treedd7dc512b234d48e3bde4bde45a347fc12688cc6 /os_net_config/tests/test_impl_ifcfg.py
parent6d046bca3c7c63993782ba6646ecdf530a643297 (diff)
Add support for OVS DPDK Bond
Add functionality to os-net-config to allow DPDK bonding of interfaces, and implement support for parameters to be passed by TripleO Heat Templates. Implements: blueprint tripleo-ovs-dpdk Depends-On: Id4a23ced28b92a642c180a35c55080e5f4e2e05d Change-Id: If1c91402d2d393140dc1b4a678e68a1bcdbe81e4
Diffstat (limited to 'os_net_config/tests/test_impl_ifcfg.py')
-rw-r--r--os_net_config/tests/test_impl_ifcfg.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/os_net_config/tests/test_impl_ifcfg.py b/os_net_config/tests/test_impl_ifcfg.py
index ad27d83..74dd1f9 100644
--- a/os_net_config/tests/test_impl_ifcfg.py
+++ b/os_net_config/tests/test_impl_ifcfg.py
@@ -788,6 +788,30 @@ OVS_BRIDGE=br-link
self.provider.bridge_data['br-link'])
self.assertEqual(dpdk0_config, self.get_interface_config('dpdk0'))
+ def test_network_ovs_dpdk_bond(self):
+ iface0 = objects.Interface(name='eth1')
+ dpdk0 = objects.OvsDpdkPort(name='dpdk0', members=[iface0])
+ iface1 = objects.Interface(name='eth2')
+ dpdk1 = objects.OvsDpdkPort(name='dpdk1', members=[iface1])
+ bond = objects.OvsDpdkBond('dpdkbond0', members=[dpdk0, dpdk1])
+ bridge = objects.OvsUserBridge('br-link', members=[bond])
+ self.provider.add_bond(bond)
+ self.provider.add_bridge(bridge)
+
+ dpdk_bond_config = """# This file is autogenerated by os-net-config
+DEVICE=dpdkbond0
+ONBOOT=yes
+HOTPLUG=no
+NM_CONTROLLED=no
+PEERDNS=no
+DEVICETYPE=ovs
+TYPE=OVSDPDKBond
+OVS_BRIDGE=br-link
+BOND_IFACES="dpdk0 dpdk1"
+"""
+ self.assertEqual(dpdk_bond_config,
+ self.get_interface_config('dpdkbond0'))
+
class TestIfcfgNetConfigApply(base.TestCase):