Adding CACERT and NO_VERIFY option on senlinclient
When deploy openstack with selfsigned CA cert, the senlin-dashboard unable to fetch required data. Adding `cacert = settings.OPENSTACK_SSL_CACERT` and `insecure = settings.OPENSTACK_SSL_NO_VERIFY` to build ks_session.Session suitable for current environment and fix SSL Error issue Closes-Bug: #2047622 Change-Id: I949871801d147a14b53696d3ebad79f0b4c8d3a7
This commit is contained in:
parent
b393d7a5dc
commit
5c215832cd
|
@ -87,7 +87,13 @@ def senlinclient(request):
|
|||
token=request.user.token.id,
|
||||
project_id=request.user.tenant_id
|
||||
)
|
||||
session = ks_session.Session(auth=auth)
|
||||
|
||||
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
|
||||
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
||||
|
||||
session = ks_session.Session(auth=auth,
|
||||
verify=cacert if cacert else not insecure,
|
||||
user_agent=USER_AGENT)
|
||||
return senlin_client.Client(session=session,
|
||||
region_name=request.user.services_region)
|
||||
|
||||
|
|
Loading…
Reference in New Issue