summaryrefslogtreecommitdiffstats
path: root/tools/opnfvdashboard/opnfvdashboard.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-08-23 14:31:31 +0100
committerMartin Klozik <martinx.klozik@intel.com>2017-08-23 15:18:14 +0100
commitc9ae2766fd566358a1ac3a38a7dc6f7b22a3449f (patch)
tree81c1e918112dc2fa2d0f3120b241fe55f4df83f8 /tools/opnfvdashboard/opnfvdashboard.py
parent1375b9eff007b51af9b04b4c36975c39cc04cde8 (diff)
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 <martinx.klozik@intel.com> Signed-off-by: Mars Toktonaliev <mars.toktonaliev@nokia.com> Signed-off-by: Morgan Richomme <morgan.richomme@orange.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: Sridhar Rao <sridhar.rao@spirent.com> Reviewed-by: Trevor Cooper <trevor.cooper@intel.com>
Diffstat (limited to 'tools/opnfvdashboard/opnfvdashboard.py')
-rw-r--r--tools/opnfvdashboard/opnfvdashboard.py13
1 files changed, 13 insertions, 0 deletions
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)