diff options
author | liyin <liyin11@huawei.com> | 2017-02-18 22:24:18 +0800 |
---|---|---|
committer | Ace Lee <liyin11@huawei.com> | 2017-02-20 11:00:13 +0000 |
commit | bffdc13b667abc6eb8bccdcc1aa82cf963a5dfa8 (patch) | |
tree | b8fdcc9be40e622e5a8a1ddb859eb03a53b10cbc /utils/infra_setup/runner/yardstick.py | |
parent | 58c97253eaaf72f73924837fca4ddcb5cb8a5d94 (diff) |
stress_test_dashboard_code
JIRA:BOTTLENECK-138
Those codes will create dashboard for stress test.
And we have fixed a bug, that we will increace env prepare in this patch
besides: we also add some code of how to yardstick api.
Change-Id: I64bb249ee0df9fe37e998a784ba346719bf25197
Signed-off-by: liyin <liyin11@huawei.com>
Diffstat (limited to 'utils/infra_setup/runner/yardstick.py')
-rw-r--r-- | utils/infra_setup/runner/yardstick.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/utils/infra_setup/runner/yardstick.py b/utils/infra_setup/runner/yardstick.py index 104cdfae..35b89ae8 100644 --- a/utils/infra_setup/runner/yardstick.py +++ b/utils/infra_setup/runner/yardstick.py @@ -64,11 +64,28 @@ def Create_Incluxdb(con_dic): test_dict = { "action": "createInfluxDBContainer", } - requests.post( + responce = requests.post( base_url, data=json.dumps(test_dict), headers=headers) + ask_data = json.loads(responce.text) + task_id = ask_data["result"]["task_id"] LOG.info("waiting for creating InfluxDB") time.sleep(30) - LOG.info("Done, creating InflxDB Container") + return task_id + + +def yardstick_env_prepare(con_dic): + base_url = ("http://%s/yardstick/env/action" + % (con_dic['yardstick_test_ip'])) + test_dict = { + "action": "prepareYardstickEnv", + } + LOG.info("waiting for yardstick environment prepare") + reponse = requests.post( + base_url, data=json.dumps(test_dict), headers=headers) + ask_data = json.loads(reponse.text) + task_id = ask_data["result"]["task_id"] + LOG.info("Done, yardstick environment prepare complete!") + return task_id def find_condition(con_dic): |