From 64c7cc4212cf46cf8d39fa0d40a20caf6230e777 Mon Sep 17 00:00:00 2001 From: JingLu5 Date: Tue, 27 Jun 2017 03:34:49 +0000 Subject: Set TEST_DB_URL for storperf JIRA: YARDSTICK-692 add the URL for the test results DB to the storperd_admin-rc TEST_DB_URL=http://testresults.opnfv.org/test/api/v1 Also, add metadata JSON to the POST to /job API when creating the job: Change-Id: Ib950f759d80e707bc49d9015bc120d985051f131 Signed-off-by: JingLu5 (cherry picked from commit 1c69f20b0f681ea66d68d077c7f85466363fee4d) --- yardstick/benchmark/scenarios/storage/storperf.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'yardstick') diff --git a/yardstick/benchmark/scenarios/storage/storperf.py b/yardstick/benchmark/scenarios/storage/storperf.py index 672cfaba2..c10118ad1 100644 --- a/yardstick/benchmark/scenarios/storage/storperf.py +++ b/yardstick/benchmark/scenarios/storage/storperf.py @@ -8,6 +8,7 @@ ############################################################################## from __future__ import absolute_import +import os import logging import time @@ -147,7 +148,18 @@ class StorPerf(base.Scenario): if not self.setup_done: self.setup() - job_args = {} + metadata = {"build_tag": "latest", "test_case": "opnfv_yardstick_tc074"} + metadata_payload_dict = {"pod_name": "NODE_NAME", + "scenario_name": "DEPLOY_SCENARIO", + "version": "YARDSTICK_BRANCH"} + + for key, value in metadata_payload_dict.items(): + try: + metadata[key] = os.environ[value] + except KeyError: + pass + + job_args = {"metadata": metadata} job_args_payload_list = ["block_sizes", "queue_depths", "deadline", "target", "nossd", "nowarm", "workload"] -- cgit 1.2.3-korg