diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-06-23 08:04:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-06-23 08:04:44 +0000 |
commit | b04150dda0678772a6a42da8d7878deb4ddcd551 (patch) | |
tree | 65c1cc11b7920d64d29052b55b73b8878430ca9d /functest/utils | |
parent | 1cc4cf8dc2a47a58d19e5d0e3e2525b94be0f6cd (diff) | |
parent | 7140b86629af0958358be5628895c4b5f1fd1ea4 (diff) |
Merge "Enable https insecure for functest"
Diffstat (limited to 'functest/utils')
-rw-r--r-- | functest/utils/openstack_utils.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py index f155449d..a8966264 100644 --- a/functest/utils/openstack_utils.py +++ b/functest/utils/openstack_utils.py @@ -181,14 +181,10 @@ def get_endpoint(service_type, endpoint_type='publicURL'): def get_session(other_creds={}): auth = get_session_auth(other_creds) - cacert = os.getenv('OS_CACERT') - if cacert is not None: - if not os.path.isfile(cacert): - raise Exception("The 'OS_CACERT' environment" - "variable is set to %s but the file" - "does not exist.", cacert) - - return session.Session(auth=auth, verify=cacert) + https_cacert = os.getenv('OS_CACERT', '') + https_insecure = os.getenv('OS_INSECURE', '').lower() == 'true' + return session.Session(auth=auth, + verify=(https_cacert or not https_insecure)) # ********************************************* |