diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-07-01 18:31:44 +0200 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2016-07-04 13:49:01 +0200 |
commit | a609ed9f56fac854b41418dbaa13ae53db5da98d (patch) | |
tree | 20717102fc706ebf67e49e7833f56103b7e066f3 /utils/functest_utils.py | |
parent | ed39c21344dc4b4209eb4319ba15ce60defc3e90 (diff) |
Add openstack clients and create instance in openstack_utils
JIRA: FUNCTEST-346
Change-Id: Ie10d55872bc8c5a404b0d0156ee49a9d94482008
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'utils/functest_utils.py')
-rw-r--r-- | utils/functest_utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/functest_utils.py b/utils/functest_utils.py index 285f887cf..9a19eb4ca 100644 --- a/utils/functest_utils.py +++ b/utils/functest_utils.py @@ -309,13 +309,15 @@ def get_criteria_by_test(testname): # YAML UTILS # # ----------------------------------------------------------- -def get_parameter_from_yaml(parameter): +def get_parameter_from_yaml(parameter, file=None): """ Returns the value of a given parameter in config_functest.yaml parameter must be given in string format with dots Example: general.openstack.image_name """ - with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f: + if file is None: + file = os.environ["CONFIG_FUNCTEST_YAML"] + with open(file) as f: functest_yaml = yaml.safe_load(f) f.close() value = functest_yaml |