aboutsummaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorSridhar Rao <sridhar.rao@spirent.com>2021-06-17 12:00:09 +0000
committerGerrit Code Review <gerrit@opnfv.org>2021-06-17 12:00:09 +0000
commit7e7df7806ac7fdd23f29f26217eb3385134cbf1e (patch)
tree3e93cc76d9af6c1e0f09ee42100b9aedf016183c /testcases
parentb3d8f3e6b150a9c1a031e4f27f3d192119e26d85 (diff)
parent8137692dd94e112943dcc576470f4b361fbd8c5c (diff)
Merge "WIP:Infrastructure for supporting more K8S Tests."
Diffstat (limited to 'testcases')
-rw-r--r--testcases/testcase.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/testcases/testcase.py b/testcases/testcase.py
index c300bfc1..40bec186 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -35,6 +35,7 @@ from tools import hugepages
from tools import functions
from tools import namespace
from tools import veth
+from tools import extvswitchflctl
from tools.teststepstools import TestStepsTools
from tools.llc_management import rmd
@@ -76,6 +77,7 @@ class TestCase(object):
self._pod_ctl = None
self._pod_list = None
self._vswitch_ctl = None
+ self._evfctl = None
self._collector = None
self._loadgen = None
self._output_file = None
@@ -203,6 +205,10 @@ class TestCase(object):
# If running in k8s mode.
# This value is set in main vsperf file
self._k8s = S.getValue('K8S')
+ if self._k8s:
+ if S.getValue('EXT_VSWITCH'):
+ self._evfctl = extvswitchfctl.ExtVswitchFlowCtl()
+
def run_initialize(self):
""" Prepare test execution environment
@@ -619,6 +625,12 @@ class TestCase(object):
Add connections for Kubernetes Usecases
"""
logging.info("Kubernetes: Adding Connections")
+ if self._evfctl:
+ self._evfctl.add_connections()
+ return
+ if self._vswitch_none:
+ logging.info("Vswitch cannot be None when switch is not external")
+ return
vswitch = self._vswitch_ctl.get_vswitch()
bridge = S.getValue('VSWITCH_BRIDGE_NAME')
if S.getValue('K8S') and 'sriov' not in S.getValue('PLUGIN'):