aboutsummaryrefslogtreecommitdiffstats
path: root/vswitches
diff options
context:
space:
mode:
authorMartin Klozik <martin.klozik@tieto.com>2018-05-17 02:07:26 -0700
committerMartin Klozik <martin.klozik@tieto.com>2018-05-24 05:50:35 +0000
commit1ea6b99c3282724cf550f71979121e6ee728f126 (patch)
tree77c5d50a1f4883b8a440aed504ca4501bcc4f0ad /vswitches
parent7224efa9539584690236218f5243b6b5c81daca9 (diff)
vpp: Implement missing dump and del functions
Implementaiton of VPP methods dump_xconnect(), del_xconnect() and del_bridge(). JIRA: VSPERF-576 Change-Id: Ifb3094d11d1b135e9a33effb1bf6d502db319a30 Signed-off-by: Martin Klozik <martin.klozik@tieto.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: Sridhar Rao <sridhar.rao@spirent.com> Reviewed-by: Richard Elias <richard.elias@tieto.com>
Diffstat (limited to 'vswitches')
-rw-r--r--vswitches/vpp_dpdk_vhost.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/vswitches/vpp_dpdk_vhost.py b/vswitches/vpp_dpdk_vhost.py
index bdb5ff81..15e32f32 100644
--- a/vswitches/vpp_dpdk_vhost.py
+++ b/vswitches/vpp_dpdk_vhost.py
@@ -317,15 +317,17 @@ class VppDpdkVhost(IVSwitch, tasks.Process):
if bidir:
self.run_vppctl(['test', 'l2patch', 'rx', port2, 'tx', port1, 'del'])
- def del_xconnect(self, _dummy_port1, _dummy_port2, _dummy_bidir=False):
+ def del_xconnect(self, port1, port2, _dummy_bidir=False):
"""Remove xconnect connection between given ports
"""
- self._logger.warning('VPP: Removal of l2 xconnect is not implemented.')
+ self.run_vppctl(['set', 'interface', 'l3', port1])
+ self.run_vppctl(['set', 'interface', 'l3', port2])
- def del_bridge(self, _dummy_switch_name, _dummy_port1, _dummy_port2):
+ def del_bridge(self, _dummy_switch_name, port1, port2):
"""Remove given ports from the bridge
"""
- self._logger.warning('VPP: Removal of interfaces from bridge is not implemented.')
+ self.run_vppctl(['set', 'interface', 'l3', port1])
+ self.run_vppctl(['set', 'interface', 'l3', port2])
def del_connection(self, switch_name, port1, port2, bidir=False):
"""See IVswitch for general description
@@ -350,7 +352,7 @@ class VppDpdkVhost(IVSwitch, tasks.Process):
def dump_xconnect(self):
"""Dump l2 xconnect connections
"""
- self._logger.warning("VPP: Dump of l2 xconnections is not supported.")
+ self.run_vppctl(['show', 'mode'] + self._phy_ports + self._virt_ports)
def dump_bridge(self, switch_name):
"""Show bridge details