Merge "Add support for OPENSTACK_SSL_{CACERT,NO_VERIFY}"

This commit is contained in:
Zuul 2018-09-12 09:01:58 +00:00 committed by Gerrit Code Review
commit fb0da5c041
1 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,7 @@ from cloudkittydashboard import utils
def cloudkittyclient(request):
"""Initialization of Cloudkitty client."""
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
auth_url = getattr(settings, 'OPENSTACK_KEYSTONE_URL', None)
auth = Token(
auth_url,
@ -37,7 +38,8 @@ def cloudkittyclient(request):
return ck_client.Client(
'1',
auth=auth,
cert=cacert)
cacert=cacert,
insecure=insecure)
def identify(what, name=False, key=None):