X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=utils%2Ftest%2Freporting%2Fyardstick%2Fscenarios.py;h=26e8c8bb01ba9414f7f3d55b051764215158a770;hb=0b9074ae2116eea2b1b88a14208fbf5742d7ef80;hp=590fea2a441898828612e65990fefab919bd648e;hpb=50f5122ab09ab0cbca792e853232adc6b5dae168;p=releng.git 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