Browse code

Add data-processing service for Sahara

When registering endpoint with data_processing keystone transforms it
into data-processing. This problem causes sahara to not find the
endpoint afterwards

We need to have two endpoints for correct working tempest and horizon
with devstack. After resolving bug in tempest and horizon need to remove
old data_processing endpoint

Change-Id: I97827d23ffe8a1218abd61e76804b918b1b7cbe0
Partial-bug: #1356053

Telles Nobrega authored on 2014/11/18 19:59:10
Showing 1 changed files
... ...
@@ -65,9 +65,25 @@ function create_sahara_accounts {
65 65
 
66 66
     if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
67 67
 
68
-        local sahara_service=$(get_or_create_service "sahara" \
69
-            "data_processing" "Sahara Data Processing")
70
-        get_or_create_endpoint $sahara_service \
68
+        # TODO: remove "data_processing" service when #1356053 will be fixed
69
+        local sahara_service_old=$(openstack service create \
70
+            "data_processing" \
71
+            --name "sahara" \
72
+            --description "Sahara Data Processing" \
73
+            -f value -c id
74
+        )
75
+        local sahara_service_new=$(openstack service create \
76
+            "data-processing" \
77
+            --name "sahara" \
78
+            --description "Sahara Data Processing" \
79
+            -f value -c id
80
+        )
81
+        get_or_create_endpoint $sahara_service_old \
82
+            "$REGION_NAME" \
83
+            "$SAHARA_SERVICE_PROTOCOL://$SAHARA_SERVICE_HOST:$SAHARA_SERVICE_PORT/v1.1/\$(tenant_id)s" \
84
+            "$SAHARA_SERVICE_PROTOCOL://$SAHARA_SERVICE_HOST:$SAHARA_SERVICE_PORT/v1.1/\$(tenant_id)s" \
85
+            "$SAHARA_SERVICE_PROTOCOL://$SAHARA_SERVICE_HOST:$SAHARA_SERVICE_PORT/v1.1/\$(tenant_id)s"
86
+        get_or_create_endpoint $sahara_service_new \
71 87
             "$REGION_NAME" \
72 88
             "$SAHARA_SERVICE_PROTOCOL://$SAHARA_SERVICE_HOST:$SAHARA_SERVICE_PORT/v1.1/\$(tenant_id)s" \
73 89
             "$SAHARA_SERVICE_PROTOCOL://$SAHARA_SERVICE_HOST:$SAHARA_SERVICE_PORT/v1.1/\$(tenant_id)s" \