From c9ae2766fd566358a1ac3a38a7dc6f7b22a3449f Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Wed, 23 Aug 2017 14:31:31 +0100 Subject: opnfvresultdb: Update data reported to result DB Data reported to result DB were updated to comply with recent API version and requirements. JIRA: VSPERF-488 Change-Id: I6ab02ea54d99099e88b0d5ab6e9745ee8297f544 Signed-off-by: Martin Klozik Signed-off-by: Mars Toktonaliev Signed-off-by: Morgan Richomme Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Sridhar Rao Reviewed-by: Trevor Cooper --- tools/opnfvdashboard/opnfvdashboard.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tools/opnfvdashboard') diff --git a/tools/opnfvdashboard/opnfvdashboard.py b/tools/opnfvdashboard/opnfvdashboard.py index 3f465c04..c24b9f8c 100644 --- a/tools/opnfvdashboard/opnfvdashboard.py +++ b/tools/opnfvdashboard/opnfvdashboard.py @@ -45,12 +45,20 @@ def _push_results(reader, int_data): version = "" allowed_pkt = ["64", "128", "512", "1024", "1518"] details = {"64": '', "128": '', "512": '', "1024": '', "1518": ''} + test_start = None + test_stop = None for row_reader in reader: if allowed_pkt.count(row_reader['packet_size']) == 0: logging.error("The framesize is not supported in opnfv dashboard") continue + # test execution time includes all frame sizes, so start & stop time + # is the same (repeated) for every framesize in CSV file + if test_start is None: + test_start = row_reader['start_time'] + test_stop = row_reader['stop_time'] + casename = _generate_test_name(row_reader['id'], int_data) if "back2back" in row_reader['id']: details[row_reader['packet_size']] = row_reader['b2b_frames'] @@ -73,10 +81,15 @@ def _push_results(reader, int_data): # Build body body = {"project_name": "vsperf", + "scenario": "vsperf", + "start_date": test_start, + "stop_date": test_stop, "case_name": casename, "pod_name": int_data['pod'], "installer": int_data['installer'], "version": version, + "build_tag": int_data['build_tag'], + "criteria": int_data['criteria'], "details": details} my_data = requests.post(url, json=body) -- cgit 1.2.3-korg