summaryrefslogtreecommitdiffstats
path: root/core/vswitch_controller_p2p.py
diff options
context:
space:
mode:
authoropensource-tnbt <sridhar.rao@spirent.com>2020-11-25 15:11:47 +0530
committeropensource-tnbt <sridhar.rao@spirent.com>2020-11-25 15:23:55 +0530
commit5be0a76d76aefbfc7b0555482df2dada7a6e5a08 (patch)
tree003daa1e3c97d6ff75522b672fecee2568d8efbd /core/vswitch_controller_p2p.py
parent092de71ff79b23ab05d013ceb417b4f0b48dcc55 (diff)
Kubernetes: Infrastructure For K8S Net testing.
This patch adds necessary code to perform K8S Networking performance benchmarking. Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com> Change-Id: I059ddd2e9ad3ee7c05e4620c64401f81474be195
Diffstat (limited to 'core/vswitch_controller_p2p.py')
-rw-r--r--core/vswitch_controller_p2p.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/vswitch_controller_p2p.py b/core/vswitch_controller_p2p.py
index d8f22e4c..0037d484 100644
--- a/core/vswitch_controller_p2p.py
+++ b/core/vswitch_controller_p2p.py
@@ -45,8 +45,9 @@ class VswitchControllerP2P(IVswitchController):
(port1, _) = self._vswitch.add_phy_port(self._bridge)
(port2, _) = self._vswitch.add_phy_port(self._bridge)
- self._vswitch.add_connection(self._bridge, port1, port2, self._traffic)
- self._vswitch.add_connection(self._bridge, port2, port1, self._traffic)
+ if not settings.getValue('K8S'):
+ self._vswitch.add_connection(self._bridge, port1, port2, self._traffic)
+ self._vswitch.add_connection(self._bridge, port2, port1, self._traffic)
except:
self._vswitch.stop()