Only add Quantum and Swift to Keystone catalog if enabled.
Incidentally removes some outdated (unused) settings from the
Horizon settings file.
Fixes bug 939820.
Change-Id: I61e97c194070e46d21a6c0eb66eef88bd14efeee
diff --git a/files/default_catalog.templates b/files/default_catalog.templates
index a5b45d7..f6125bb 100644
--- a/files/default_catalog.templates
+++ b/files/default_catalog.templates
@@ -22,15 +22,3 @@
catalog.RegionOne.image.adminURL = http://%SERVICE_HOST%:9292/v1
catalog.RegionOne.image.internalURL = http://%SERVICE_HOST%:9292/v1
catalog.RegionOne.image.name = 'Image Service'
-
-
-catalog.RegionOne.object_store.publicURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s
-catalog.RegionOne.object_store.adminURL = http://%SERVICE_HOST%:8080/
-catalog.RegionOne.object_store.internalURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s
-catalog.RegionOne.object_store.name = 'Swift Service'
-
-
-catalog.RegionOne.network.publicURL = http://%SERVICE_HOST%:9696/
-catalog.RegionOne.network.adminURL = http://%SERVICE_HOST%:9696/
-catalog.RegionOne.network.internalURL = http://%SERVICE_HOST%:9696/
-catalog.RegionOne.network.name = 'Quantum Service'
diff --git a/files/horizon_settings.py b/files/horizon_settings.py
index 05ddfe7..bbff08f 100644
--- a/files/horizon_settings.py
+++ b/files/horizon_settings.py
@@ -49,13 +49,6 @@
SWIFT_PAGINATE_LIMIT = 100
-# Configure quantum connection details for networking
-QUANTUM_ENABLED = False
-QUANTUM_URL = '%s' % OPENSTACK_HOST
-QUANTUM_PORT = '9696'
-QUANTUM_TENANT = '1234'
-QUANTUM_CLIENT_VERSION='0.1'
-
# If you have external monitoring links, eg:
# EXTERNAL_MONITORING = [
# ['Nagios','http://foo.com'],
diff --git a/stack.sh b/stack.sh
index 8e71760..6789778 100755
--- a/stack.sh
+++ b/stack.sh
@@ -1298,6 +1298,23 @@
KEYSTONE_CATALOG=$KEYSTONE_DIR/etc/default_catalog.templates
cp $FILES/default_catalog.templates $KEYSTONE_CATALOG
+
+ # Add swift endpoints to service catalog if swift is enabled
+ if is_service_enabled swift; then
+ echo "catalog.RegionOne.object_store.publicURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s" >> $KEYSTONE_CATALOG
+ echo "catalog.RegionOne.object_store.adminURL = http://%SERVICE_HOST%:8080/" >> $KEYSTONE_CATALOG
+ echo "catalog.RegionOne.object_store.internalURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s" >> $KEYSTONE_CATALOG
+ echo "catalog.RegionOne.object_store.name = 'Swift Service'" >> $KEYSTONE_CATALOG
+ fi
+
+ # Add quantum endpoints to service catalog if quantum is enabled
+ if is_service_enabled quantum; then
+ echo "catalog.RegionOne.network.publicURL = http://%SERVICE_HOST%:9696/" >> $KEYSTONE_CATALOG
+ echo "catalog.RegionOne.network.adminURL = http://%SERVICE_HOST%:9696/" >> $KEYSTONE_CATALOG
+ echo "catalog.RegionOne.network.internalURL = http://%SERVICE_HOST%:9696/" >> $KEYSTONE_CATALOG
+ echo "catalog.RegionOne.network.name = 'Quantum Service'" >> $KEYSTONE_CATALOG
+ fi
+
sudo sed -e "s,%SERVICE_HOST%,$SERVICE_HOST,g" -i $KEYSTONE_CATALOG