Merge "Pass certificate, key and cacert to glanceclient"

This commit is contained in:
Jenkins 2014-09-17 20:08:58 +00:00 committed by Gerrit Code Review
commit 3705f9ee56

View File

@ -86,6 +86,7 @@ CONF = cfg.CONF
CONF.register_opts(glance_opts, 'glance')
CONF.import_opt('auth_strategy', 'nova.api.auth')
CONF.import_opt('my_ip', 'nova.netconf')
CONF.import_group('ssl', 'nova.openstack.common.sslutils')
def generate_glance_url():
@ -137,6 +138,12 @@ def _create_glance_client(context, host, port, use_ssl, version=1):
# https specific params
params['insecure'] = CONF.glance.api_insecure
params['ssl_compression'] = False
if CONF.ssl.cert_file:
params['cert_file'] = CONF.ssl.cert_file
if CONF.ssl.key_file:
params['key_file'] = CONF.ssl.key_file
if CONF.ssl.ca_file:
params['cacert'] = CONF.ssl.ca_file
else:
scheme = 'http'