From 00ae14186c5292c04766321d02fc7f82668ee066 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Fri, 17 Mar 2017 09:32:53 +0000 Subject: vpp: Reporting update related to VPP VSPERF reports were updated to contain vSwitch name. In case of VPP, it is not possible to read its version if VPP is not running. Thus VSPERF was enhanced to support tool version check during its runtime. This mechanism can be enhanced to support e.g. VNF in the future. JIRA: VSPERF-496 Change-Id: I74b47505e35340eead165d9b588e9cc15c058bbf Signed-off-by: Martin Klozik Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Sridhar Rao Reviewed-by: Trevor Cooper --- testcases/performance.py | 2 +- testcases/testcase.py | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) (limited to 'testcases') diff --git a/testcases/performance.py b/testcases/performance.py index 0be99724..a82b5d1c 100644 --- a/testcases/performance.py +++ b/testcases/performance.py @@ -34,4 +34,4 @@ class PerformanceTestCase(TestCase): def run_report(self): super(PerformanceTestCase, self).run_report() if self._tc_results: - report.generate(self._output_file, self._tc_results, self._collector.get_results(), self._type) + report.generate(self) diff --git a/testcases/testcase.py b/testcases/testcase.py index 4fbf9c04..5446d0d9 100644 --- a/testcases/testcase.py +++ b/testcases/testcase.py @@ -65,6 +65,7 @@ class TestCase(object): self._settings_original = {} self._settings_paths_modified = False self._testcast_run_time = None + self._versions = [] # initialization of step driven specific members self._step_check = False # by default don't check result for step driven testcases self._step_vnf_list = {} @@ -303,6 +304,8 @@ class TestCase(object): if not self._vswitch_none: self._add_flows() + self._versions += self._vswitch_ctl.get_vswitch().get_version() + with self._traffic_ctl: # execute test based on TestSteps definition if needed... if self.step_run(): @@ -358,6 +361,7 @@ class TestCase(object): for item in results: item[ResultsConstants.ID] = self.name item[ResultsConstants.DEPLOYMENT] = self.deployment + item[ResultsConstants.VSWITCH] = S.getValue('VSWITCH') item[ResultsConstants.TRAFFIC_TYPE] = self._traffic['l3']['proto'] item[ResultsConstants.TEST_RUN_TIME] = self._testcase_run_time if self._traffic['multistream']: @@ -774,3 +778,36 @@ class TestCase(object): # all steps processed without any issue return True + + # + # get methods for TestCase members, which needs to be publicly available + # + def get_output_file(self): + """Return content of self._output_file member + """ + return self._output_file + + def get_desc(self): + """Return content of self.desc member + """ + return self.desc + + def get_versions(self): + """Return content of self.versions member + """ + return self._versions + + def get_traffic(self): + """Return content of self._traffic member + """ + return self._traffic + + def get_tc_results(self): + """Return content of self._tc_results member + """ + return self._tc_results + + def get_collector(self): + """Return content of self._collector member + """ + return self._collector -- cgit 1.2.3-korg