Browse code

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

Gabriel Hurley authored on 2012/02/24 06:20:03
Showing 3 changed files
... ...
@@ -22,15 +22,3 @@ catalog.RegionOne.image.publicURL = http://%SERVICE_HOST%:9292/v1
22 22
 catalog.RegionOne.image.adminURL = http://%SERVICE_HOST%:9292/v1
23 23
 catalog.RegionOne.image.internalURL = http://%SERVICE_HOST%:9292/v1
24 24
 catalog.RegionOne.image.name = 'Image Service'
25
-
26
-
27
-catalog.RegionOne.object_store.publicURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s
28
-catalog.RegionOne.object_store.adminURL = http://%SERVICE_HOST%:8080/
29
-catalog.RegionOne.object_store.internalURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s
30
-catalog.RegionOne.object_store.name = 'Swift Service'
31
-
32
-
33
-catalog.RegionOne.network.publicURL = http://%SERVICE_HOST%:9696/
34
-catalog.RegionOne.network.adminURL = http://%SERVICE_HOST%:9696/
35
-catalog.RegionOne.network.internalURL = http://%SERVICE_HOST%:9696/
36
-catalog.RegionOne.network.name = 'Quantum Service'
... ...
@@ -49,13 +49,6 @@ OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"
49 49
 
50 50
 SWIFT_PAGINATE_LIMIT = 100
51 51
 
52
-# Configure quantum connection details for networking
53
-QUANTUM_ENABLED = False
54
-QUANTUM_URL = '%s'  % OPENSTACK_HOST
55
-QUANTUM_PORT = '9696'
56
-QUANTUM_TENANT = '1234'
57
-QUANTUM_CLIENT_VERSION='0.1'
58
-
59 52
 # If you have external monitoring links, eg:
60 53
 # EXTERNAL_MONITORING = [
61 54
 #     ['Nagios','http://foo.com'],
... ...
@@ -1298,6 +1298,23 @@ if is_service_enabled key; then
1298 1298
 
1299 1299
     KEYSTONE_CATALOG=$KEYSTONE_DIR/etc/default_catalog.templates
1300 1300
     cp $FILES/default_catalog.templates $KEYSTONE_CATALOG
1301
+
1302
+    # Add swift endpoints to service catalog if swift is enabled
1303
+    if is_service_enabled swift; then
1304
+        echo "catalog.RegionOne.object_store.publicURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s" >> $KEYSTONE_CATALOG
1305
+        echo "catalog.RegionOne.object_store.adminURL = http://%SERVICE_HOST%:8080/" >> $KEYSTONE_CATALOG
1306
+        echo "catalog.RegionOne.object_store.internalURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s" >> $KEYSTONE_CATALOG
1307
+        echo "catalog.RegionOne.object_store.name = 'Swift Service'" >> $KEYSTONE_CATALOG
1308
+    fi
1309
+
1310
+    # Add quantum endpoints to service catalog if quantum is enabled
1311
+    if is_service_enabled quantum; then
1312
+        echo "catalog.RegionOne.network.publicURL = http://%SERVICE_HOST%:9696/" >> $KEYSTONE_CATALOG
1313
+        echo "catalog.RegionOne.network.adminURL = http://%SERVICE_HOST%:9696/" >> $KEYSTONE_CATALOG
1314
+        echo "catalog.RegionOne.network.internalURL = http://%SERVICE_HOST%:9696/" >> $KEYSTONE_CATALOG
1315
+        echo "catalog.RegionOne.network.name = 'Quantum Service'" >> $KEYSTONE_CATALOG
1316
+    fi
1317
+
1301 1318
     sudo sed -e "s,%SERVICE_HOST%,$SERVICE_HOST,g" -i $KEYSTONE_CATALOG
1302 1319
 
1303 1320