diff options
author | JingLu5 <lvjing5@huawei.com> | 2017-06-27 03:34:49 +0000 |
---|---|---|
committer | JingLu5 <lvjing5@huawei.com> | 2017-06-27 03:39:46 +0000 |
commit | 1c69f20b0f681ea66d68d077c7f85466363fee4d (patch) | |
tree | 26519fd9f69c06c87db8dcc6e8174d84ae8b6507 | |
parent | 1ff9df7e724eb0c981aebd5f5b8aa90db0da292b (diff) |
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 <lvjing5@huawei.com>
-rwxr-xr-x | tests/ci/prepare_storperf_admin-rc.sh | 1 | ||||
-rw-r--r-- | yardstick/benchmark/scenarios/storage/storperf.py | 14 |
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/ci/prepare_storperf_admin-rc.sh b/tests/ci/prepare_storperf_admin-rc.sh index 979728e84..558375e62 100755 --- a/tests/ci/prepare_storperf_admin-rc.sh +++ b/tests/ci/prepare_storperf_admin-rc.sh @@ -35,3 +35,4 @@ echo "OS_TENANT_ID="$TENANT_ID >> ~/storperf_admin-rc echo "OS_USER_DOMAIN_ID="$USER_DOMAIN_ID >> ~/storperf_admin-rc echo "OS_PROJECT_DOMAIN_NAME="$OS_PROJECT_DOMAIN_NAME >> ~/storperf_admin-rc echo "OS_USER_DOMAIN_NAME="$OS_USER_DOMAIN_NAME >> ~/storperf_admin-rc +echo "TEST_DB_URL=http://testresults.opnfv.org/test/api/v1" >> ~/storperf_admin-rc 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"] |