From a609ed9f56fac854b41418dbaa13ae53db5da98d Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Fri, 1 Jul 2016 18:31:44 +0200 Subject: Add openstack clients and create instance in openstack_utils JIRA: FUNCTEST-346 Change-Id: Ie10d55872bc8c5a404b0d0156ee49a9d94482008 Signed-off-by: jose.lausuch --- utils/functest_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'utils/functest_utils.py') diff --git a/utils/functest_utils.py b/utils/functest_utils.py index 285f887c..9a19eb4c 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 -- cgit 1.2.3-korg