diff options
author | mbeierl <mark.beierl@dell.com> | 2017-10-06 10:43:42 -0400 |
---|---|---|
committer | mbeierl <mark.beierl@dell.com> | 2017-10-06 10:43:42 -0400 |
commit | d45e5a980fc4f75f0f9abed929705da32e9f2fcf (patch) | |
tree | 3a319b5a01756d24dba83d1208d19a8bfcea0d78 /docker/storperf-master | |
parent | aa2fb5acde380188b063131c5c3c48e637ca6b9f (diff) |
Adding SSL Certificate Support
Change-Id: I4a45e5602afc3a1c303a44adc15c9ef94fe732bb
Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'docker/storperf-master')
-rw-r--r-- | docker/storperf-master/storperf/storperf_master.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/docker/storperf-master/storperf/storperf_master.py b/docker/storperf-master/storperf/storperf_master.py index 8a67048..ef9ace3 100644 --- a/docker/storperf-master/storperf/storperf_master.py +++ b/docker/storperf-master/storperf/storperf_master.py @@ -538,7 +538,14 @@ class StorPerfMaster(object): loader = loading.get_plugin_loader('password') auth = loader.load_from_options(**creds) - sess = session.Session(auth=auth) + + https_cacert = os.getenv('OS_CACERT', '') + https_insecure = os.getenv('OS_INSECURE', '').lower() == 'true' + + self.logger.info("cacert=%s" % https_cacert) + + sess = session.Session(auth=auth, + verify=(https_cacert or not https_insecure)) self.logger.debug("Looking up orchestration endpoint") heat_endpoint = sess.get_endpoint(auth=auth, @@ -546,13 +553,13 @@ class StorPerfMaster(object): endpoint_type='publicURL') self.logger.debug("Orchestration endpoint is %s" % heat_endpoint) - token = sess.get_token(auth=auth) self._heat_client = heatclient.Client( "1", endpoint=heat_endpoint, - token=token) + session=sess) self.logger.debug("Creating cinder client") - self._cinder_client = cinderclient.Client("2", session=sess) + self._cinder_client = cinderclient.Client("2", session=sess, + cacert=https_cacert) self.logger.debug("OpenStack authentication complete") |