diff options
author | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2021-06-02 19:11:18 +0530 |
---|---|---|
committer | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2021-06-15 21:34:48 +0530 |
commit | 8137692dd94e112943dcc576470f4b361fbd8c5c (patch) | |
tree | 7e1b60be919d8d1e8ce9821191a23aa8d8c1c758 /testcases | |
parent | 300d9f201aba1b8e30387138acaba79a72502d82 (diff) |
WIP:Infrastructure for supporting more K8S Tests.
This patch add multiple changes to ViNePerf to support following tests.
1. External virtual switch - not managed by Vineperf.
2. CNI not based on virtual switch
3. Fixed bugs after successful testing.
4. Pylint issues fixed
4. Fix some license-content and comments
Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
Change-Id: Ie01735f99c0687cc812eae8e67ee2353347924f2
Diffstat (limited to 'testcases')
-rw-r--r-- | testcases/testcase.py | 12 |
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'): |