From 76878eb2972ad789c2eb7fe3f2eefa285b3e72d6 Mon Sep 17 00:00:00 2001 From: "Sridhar K. N. Rao" Date: Wed, 28 Apr 2021 18:39:15 +0530 Subject: [WIP] - Reporting support for Openstack and K8S Test Runs. This patch adds support for generating report when tests are run for K8S and openstack. Added cloud-information gathering tool. Move the tool to report folder. Call the save cloud information from vsperf. Fixed issues reported by Al. Additional fixes. JIRA: VINEPERF-644 Signed-off-by: Sridhar K. N. Rao Change-Id: I4aea2e52a4c6700f80624f3e1828b74a108e03ba --- vsperf | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'vsperf') diff --git a/vsperf b/vsperf index 773ad759..1fb52429 100755 --- a/vsperf +++ b/vsperf @@ -47,6 +47,7 @@ from tools import functions from tools.pkt_gen import trafficgen from tools.opnfvdashboard import opnfvdashboard from tools.os_deploy_tgen import osdt +from tools.report import cloudinfo sys.dont_write_bytecode = True VERBOSITY_LEVELS = { @@ -728,6 +729,7 @@ def main(): settings.setValue('K8S', False) if args['openstack']: + settings.setValue('OPENSTACK', True) result = osdt.deploy_testvnf() if result: _LOGGER.info('TestVNF successfully deployed on Openstack') @@ -735,6 +737,9 @@ def main(): else: _LOGGER.error('Failed to deploy TestVNF in Openstac') sys.exit(1) + else: + settings.setValue('OPENSTACK', False) + # update paths to trafficgens if required if settings.getValue('mode') == 'trafficgen': functions.settings_update_paths() @@ -879,6 +884,9 @@ def main(): suite = unittest.TestSuite() settings_snapshot = copy.deepcopy(settings.__dict__) + if settings.getValue('OPENSTACK') or settings.getValue('K8S'): + cloudinfo.save_cloud_info() + for i, cfg in enumerate(selected_tests): settings.setValue('_TEST_INDEX', i) test_name = cfg.get('Name', '') -- cgit 1.2.3-korg