From 124e6827a8d790594812385ba39d43f7cdbc1aa4 Mon Sep 17 00:00:00 2001 From: Emmanuel MISSIAEN Date: Fri, 18 Jan 2019 11:18:39 +0100 Subject: [PATCH] Honor OPENSTACK_ENDPOINT_TYPE in Horizon's local_settings.py Story: 2003777 Task: 26470 Change-Id: Idd173a9c518f99de58e63f5cc6d3b0ccae0d80a1 --- octavia_dashboard/api/rest/lbaasv2.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/octavia_dashboard/api/rest/lbaasv2.py b/octavia_dashboard/api/rest/lbaasv2.py index 7d4daf34..ff8c86cc 100644 --- a/octavia_dashboard/api/rest/lbaasv2.py +++ b/octavia_dashboard/api/rest/lbaasv2.py @@ -46,12 +46,15 @@ def _get_sdk_connection(request): # get_one_cloud wants verify, so we pass 'not insecure' to verify. insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False) 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 # and we don't want to accidentaly pick up a clouds.yaml file. We want to # use the settings we're passing in. cloud_config = occ.OpenStackConfig(load_yaml_config=False).get_one_cloud( verify=not insecure, cacert=cacert, + interface=interface, region_name=request.user.services_region, auth_type='token', auth=dict(