Honor OPENSTACK_ENDPOINT_TYPE in Horizon's local_settings.py
Story: 2003777 Task: 26470 Change-Id: Idd173a9c518f99de58e63f5cc6d3b0ccae0d80a1
This commit is contained in:
parent
da5daa42f0
commit
124e6827a8
@ -46,12 +46,15 @@ def _get_sdk_connection(request):
|
|||||||
# get_one_cloud wants verify, so we pass 'not insecure' to verify.
|
# get_one_cloud wants verify, so we pass 'not insecure' to verify.
|
||||||
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
||||||
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
|
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
|
||||||
|
# Pass interface to honor 'OPENSTACK_ENDPOINT_TYPE'
|
||||||
|
interface = getattr(settings, 'OPENSTACK_ENDPOINT_TYPE', 'publicURL')
|
||||||
# Pass load_yaml_config as this is a Django service with its own config
|
# Pass load_yaml_config as this is a Django service with its own config
|
||||||
# and we don't want to accidentaly pick up a clouds.yaml file. We want to
|
# and we don't want to accidentaly pick up a clouds.yaml file. We want to
|
||||||
# use the settings we're passing in.
|
# use the settings we're passing in.
|
||||||
cloud_config = occ.OpenStackConfig(load_yaml_config=False).get_one_cloud(
|
cloud_config = occ.OpenStackConfig(load_yaml_config=False).get_one_cloud(
|
||||||
verify=not insecure,
|
verify=not insecure,
|
||||||
cacert=cacert,
|
cacert=cacert,
|
||||||
|
interface=interface,
|
||||||
region_name=request.user.services_region,
|
region_name=request.user.services_region,
|
||||||
auth_type='token',
|
auth_type='token',
|
||||||
auth=dict(
|
auth=dict(
|
||||||
|
Loading…
Reference in New Issue
Block a user