diff options
author | 2016-11-16 18:16:43 +0100 | |
---|---|---|
committer | 2016-11-17 09:27:08 +0100 | |
commit | c850beb64083c730301188ade4cbba0f2a329a92 (patch) | |
tree | 19b241b8a85c463744cff8e4e40c8b4e3764475b /utils/test/reporting/yardstick/scenarios.py | |
parent | 483081b7fb0cf5d7dec5ee1d6ff0bddc387a59dc (diff) |
Refactor reporting dir
- dockerization
- create util function for all the test projects
- create a common config files
- add unit tests
- pep8
JIRA: RELENG-162
Change-Id: Ib209be4233084100ff238a7aeb2843ccc24a6f1e
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'utils/test/reporting/yardstick/scenarios.py')
-rw-r--r-- | utils/test/reporting/yardstick/scenarios.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/utils/test/reporting/yardstick/scenarios.py b/utils/test/reporting/yardstick/scenarios.py index 590fea2a4..26e8c8bb0 100644 --- a/utils/test/reporting/yardstick/scenarios.py +++ b/utils/test/reporting/yardstick/scenarios.py @@ -1,11 +1,18 @@ -import yaml -import os +#!/usr/bin/python +# +# This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# import requests +import yaml -import reportingConf as conf - +import utils.reporting_utils as rp_utils -response = requests.get(conf.TEST_CONF) +yardstick_conf = rp_utils.get_config('yardstick.test_conf') +response = requests.get(yardstick_conf) yaml_file = yaml.safe_load(response.text) reporting = yaml_file.get('reporting') @@ -15,6 +22,6 @@ for element in reporting: name = element['name'] scenarios = element['scenario'] for s in scenarios: - if not config.has_key(name): + if name not in config: config[name] = {} config[name][s] = True |