From bb9f7cecbb1c7a0eced8b869c5bd234ac510c1c5 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 12 Jun 2015 11:29:18 +0100 Subject: [PATCH] Correct local_settings when AVAILABLE_REGIONS is set As per the discussion in https://review.openstack.org/190302: When AVAILABLE_REGIONS is set, OPENSTACK_HOST and OPENSTACK_KEYSTONE_URL are no longer required in local_settings as per Horizon developer documentation. This patch implements this either/or configuration. Change-Id: Iee9b41c34f770f2e8d76ef0e1e1a974f286ca6a9 Closes-Bug: #1463772 --- templates/horizon_local_settings.py.j2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/horizon_local_settings.py.j2 b/templates/horizon_local_settings.py.j2 index 58c69288..99a4947e 100644 --- a/templates/horizon_local_settings.py.j2 +++ b/templates/horizon_local_settings.py.j2 @@ -162,16 +162,22 @@ AVAILABLE_REGIONS = [ ('{{ item.url }}', '{{ item.name }}'), {% endfor %} ] + +# This is not used because AVAILABLE_REGIONS is defined +#OPENSTACK_HOST = "{{ internal_lb_vip_address }}" +#OPENSTACK_KEYSTONE_URL = "{{ keystone_service_internalurl }}" {% else %} # For multiple regions uncomment this configuration, and add (endpoint, title). # AVAILABLE_REGIONS = [ # ('http://cluster1.example.com:5000/v2.0', 'cluster1'), # ('http://cluster2.example.com:5000/v2.0', 'cluster2'), # ] -{% endif %} +# This is only used if AVAILABLE_REGIONS is not defined OPENSTACK_HOST = "{{ internal_lb_vip_address }}" OPENSTACK_KEYSTONE_URL = "{{ keystone_service_internalurl }}" +{% endif %} + OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_" # Enables keystone web single-sign-on if set to True.