summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel MISSIAEN <emmanuel.missiaen@gendarmerie.interieur.gouv.fr>2019-01-18 11:18:39 +0100
committerEmmanuel MISSIAEN <emmanuel.missiaen@gendarmerie.interieur.gouv.fr>2019-01-18 11:18:39 +0100
commit124e6827a8d790594812385ba39d43f7cdbc1aa4 (patch)
treed1e98251b1c7cc486ea2c3eba26310f80a307142
parentda5daa42f00c97e7e85c80a8cc435ce6b1b77db0 (diff)
Honor OPENSTACK_ENDPOINT_TYPE in Horizon's local_settings.py
Notes
Notes (review): Code-Review+2: Michael Johnson <johnsomor@gmail.com> Code-Review+2: Carlos Goncalves <cgoncalves@redhat.com> Workflow+1: Carlos Goncalves <cgoncalves@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 18 Jan 2019 16:23:41 +0000 Reviewed-on: https://review.openstack.org/631770 Project: openstack/octavia-dashboard Branch: refs/heads/master
-rw-r--r--octavia_dashboard/api/rest/lbaasv2.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/octavia_dashboard/api/rest/lbaasv2.py b/octavia_dashboard/api/rest/lbaasv2.py
index 7d4daf3..ff8c86c 100644
--- a/octavia_dashboard/api/rest/lbaasv2.py
+++ b/octavia_dashboard/api/rest/lbaasv2.py
@@ -46,12 +46,15 @@ def _get_sdk_connection(request):
46 # get_one_cloud wants verify, so we pass 'not insecure' to verify. 46 # get_one_cloud wants verify, so we pass 'not insecure' to verify.
47 insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False) 47 insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
48 cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None) 48 cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
49 # Pass interface to honor 'OPENSTACK_ENDPOINT_TYPE'
50 interface = getattr(settings, 'OPENSTACK_ENDPOINT_TYPE', 'publicURL')
49 # Pass load_yaml_config as this is a Django service with its own config 51 # Pass load_yaml_config as this is a Django service with its own config
50 # and we don't want to accidentaly pick up a clouds.yaml file. We want to 52 # and we don't want to accidentaly pick up a clouds.yaml file. We want to
51 # use the settings we're passing in. 53 # use the settings we're passing in.
52 cloud_config = occ.OpenStackConfig(load_yaml_config=False).get_one_cloud( 54 cloud_config = occ.OpenStackConfig(load_yaml_config=False).get_one_cloud(
53 verify=not insecure, 55 verify=not insecure,
54 cacert=cacert, 56 cacert=cacert,
57 interface=interface,
55 region_name=request.user.services_region, 58 region_name=request.user.services_region,
56 auth_type='token', 59 auth_type='token',
57 auth=dict( 60 auth=dict(