diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-03-18 12:25:33 +0100 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2016-03-18 15:16:44 +0100 |
commit | b118662e7c4a151575d988452cda4f3a4903a524 (patch) | |
tree | dbe75a54b1ed7efc3960a7960280f93309940a09 /testcases/functest_utils.py | |
parent | 727cc9cdd5d8e8ed1389c27a255c6ee9ad3122d9 (diff) |
Fix support for CACERT and set OS_INSECURE=true
JIRA: FUNCTEST-145
Change-Id: If8fce037117d7c7d16d08a558d0675cbfe5f9836
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'testcases/functest_utils.py')
-rw-r--r-- | testcases/functest_utils.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/testcases/functest_utils.py b/testcases/functest_utils.py index 9a8e602ac..9534cf49b 100644 --- a/testcases/functest_utils.py +++ b/testcases/functest_utils.py @@ -67,12 +67,15 @@ def get_credentials(service): "http://192.168.20.71:5000/v2.0"), tenant: os.environ.get("OS_TENANT_NAME", "admin"), }) - ssl = os.environ.get("OS_CACERT") - if ssl != None: - creds.update({"ca_cert":ssl}) - if not os.path.isfile(ssl): + cacert = os.environ.get("OS_CACERT") + if cacert != None: + # each openstack client uses differnt kwargs for this + creds.update({"cacert":cacert,"ca_cert":cacert,"https_ca_cert":cacert, \ + "https_cacert":cacert,"ca_file":cacert}) + creds.update({"insecure":"True","https_insecure":"True"}) + if not os.path.isfile(cacert): print "WARNING: The 'OS_CACERT' environment variable is set to %s "\ - "but the file does not exist." % ssl + "but the file does not exist." % cacert return creds |