summaryrefslogtreecommitdiffstats
path: root/ci/prepare_env.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-09-07 22:13:42 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-09-08 10:45:45 +0800
commit55d301a2622ff5b63d431b9272caa68224d53843 (patch)
treeb540f05ba3ed45e15260ee7131ce90dc93af753d /ci/prepare_env.py
parent227afb8285b8f178987a7d6eb1d28a74201a5d1b (diff)
make use of functest_utils.get_parameter_from_yaml
JIRA: FUNCTEST-463 Change-Id: I1d54a65c5bfa2542f2fd3a2e408967641e6e4ac9 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'ci/prepare_env.py')
-rwxr-xr-xci/prepare_env.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/ci/prepare_env.py b/ci/prepare_env.py
index 49b3ea75e..63a0ad4a8 100755
--- a/ci/prepare_env.py
+++ b/ci/prepare_env.py
@@ -48,21 +48,21 @@ CONFIG_FUNCTEST_PATH = os.environ["CONFIG_FUNCTEST_YAML"]
CONFIG_PATCH_PATH = os.path.join(os.path.dirname(
CONFIG_FUNCTEST_PATH), "config_patch.yaml")
-functest_yaml = ft_utils.get_functest_yaml()
-
with open(CONFIG_PATCH_PATH) as f:
functest_patch_yaml = yaml.safe_load(f)
-FUNCTEST_CONF_DIR = functest_yaml.get("general").get(
- "directories").get("dir_functest_conf")
+FUNCTEST_CONF_DIR = \
+ ft_utils.get_functest_config('general.directories.dir_functest_conf')
+
-FUNCTEST_DATA_DIR = functest_yaml.get("general").get(
- "directories").get("dir_functest_data")
-FUNCTEST_RESULTS_DIR = functest_yaml.get("general").get(
- "directories").get("dir_results")
-DEPLOYMENT_MAME = functest_yaml.get("rally").get("deployment_name")
-TEMPEST_REPO_DIR = functest_yaml.get("general").get(
- "directories").get("dir_repo_tempest")
+FUNCTEST_DATA_DIR = \
+ ft_utils.get_functest_config('general.directories.dir_functest_data')
+FUNCTEST_RESULTS_DIR = \
+ ft_utils.get_functest_config('general.directories.dir_results')
+DEPLOYMENT_MAME = \
+ ft_utils.get_functest_config('rally.deployment_name')
+TEMPEST_REPO_DIR = \
+ ft_utils.get_functest_config('general.directories.dir_repo_tempest')
ENV_FILE = FUNCTEST_CONF_DIR + "/env_active"
@@ -191,7 +191,7 @@ def patch_config_file():
for key in functest_patch_yaml:
if key in CI_SCENARIO:
new_functest_yaml = dict(ft_utils.merge_dicts(
- functest_yaml, functest_patch_yaml[key]))
+ ft_utils.get_functest_yaml(), functest_patch_yaml[key]))
updated = True
if updated: