Use identity V3 API for endpoint creation
Always use the keystone V3 API when creating services and endpoints. The syntax
here is slightly different but we maintain the function interface.
Change-Id: Ib3a375918a45fd6e37d873a1a5c0c4b26bdbb5d8
Implements: bp keystonev3
diff --git a/lib/glance b/lib/glance
index 4dbce9f..be6ccf9 100644
--- a/lib/glance
+++ b/lib/glance
@@ -266,9 +266,8 @@
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
- local glance_service=$(get_or_create_service "glance" \
- "image" "Glance Image Service")
- get_or_create_endpoint $glance_service \
+ get_or_create_service "glance" "image" "Glance Image Service"
+ get_or_create_endpoint "image" \
"$REGION_NAME" \
"$GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT" \
"$GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT" \
@@ -279,10 +278,9 @@
# Add glance-search service and endpoints
if is_service_enabled g-search; then
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
- local glance_search_service=$(get_or_create_service "glance-search" \
- "search" "EXPERIMENTAL - Glance Graffiti Search Service")
+ get_or_create_service "glance-search" "search" "EXPERIMENTAL - Glance Graffiti Search Service"
- get_or_create_endpoint $glance_search_service \
+ get_or_create_endpoint "search" \
"$REGION_NAME" \
"$GLANCE_SERVICE_PROTOCOL://$GLANCE_SEARCH_HOSTPORT" \
"$GLANCE_SERVICE_PROTOCOL://$GLANCE_SEARCH_HOSTPORT" \