diff options
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 57a2aa2b..cc62f29c 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)) # ********************************************* |