summaryrefslogtreecommitdiffstats
path: root/os_net_config/tests/test_objects.py
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2017-01-23 22:29:27 -0500
committerFeng Pan <fpan@redhat.com>2017-03-21 15:28:35 -0400
commitc5e11bbfcda78f021b38bf9177f0c661b8f59b20 (patch)
tree9560c4f3c1d0cb6dcd4f2cf80a463a9b1570f292 /os_net_config/tests/test_objects.py
parent5f0145b88571b945b633f999c0d767ccefdce86b (diff)
Add support for VPP interface
Vector Packet Processing (VPP) is a high performance packet processing stack that runs in user space in Linux. VPP is used as an alternative to kernel networking stack for accelerated network data path. VPP uses DPDK poll-mode drivers to bind system interfaces rather than kernel drivers. VPP bound interfacees are not visible to kernel networking stack and therefore require different configuration steps in os-net-config. VPP interface will be used in Openstack by either Neutron ML2 driver networking-vpp as an alternative to OVS, or by Opendaylight SDN controller with Honeycomb agent. This patch adds interface configuration support to os-net-config. The kernel nic specified to be VPP interface type will be bound to VPP with a DPDK poll-mode driver. Note that os-net-config will only configure those settings that affect interface binding, all other configurations for VPP will be configured throught TripleO Heat Templates. Implements: blueprint fdio-integration-tripleo Change-Id: Iebb40b7c5b252c51e86b6f44bcf36ed206101390 Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'os_net_config/tests/test_objects.py')
-rw-r--r--os_net_config/tests/test_objects.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/os_net_config/tests/test_objects.py b/os_net_config/tests/test_objects.py
index f5daf31..4ff87c8 100644
--- a/os_net_config/tests/test_objects.py
+++ b/os_net_config/tests/test_objects.py
@@ -988,3 +988,19 @@ class TestOvsDpdkBond(base.TestCase):
self.assertEqual("vfio-pci", dpdk_port1.driver)
iface2 = dpdk_port1.members[0]
self.assertEqual("eth2", iface2.name)
+
+
+class TestVppInterface(base.TestCase):
+ def test_vpp_interface_from_json(self):
+ data = """{
+"type": "vpp_interface",
+"name": "em1",
+"uio_driver": "uio_pci_generic",
+"options": "vlan-strip-offload off"
+}
+"""
+
+ vpp_interface = objects.object_from_json(json.loads(data))
+ self.assertEqual("em1", vpp_interface.name)
+ self.assertEqual("uio_pci_generic", vpp_interface.uio_driver)
+ self.assertEqual("vlan-strip-offload off", vpp_interface.options)