Fix service and endpoint creation in DevStack

DevStack removed support for specifying a Keystone catalog backend other
than sql in commit 985e958dda3e843442f76199caf63fa8b93680cc. However,
the variable KEYSTONE_CATALOG_BACKEND was still set, which meant the
blazar service and endpoint were still being created.

This variable was removed in fb73d85afe7df7b93b9a460372a8ad6558e887e0
which results in our DevStack plugin not creating the blazar service and
endpoint anymore.

Create service and endpoint unconditionally instead.

Note that the code creating a Keystone v3 service and endpoint is kept
even though Keystone v3 is now the default in DevStack. This is because
the Keystone endpoint in DevStack is now unversioned, which is not yet
supported by Blazar. We need Keystone v3 to use trusts.

Depends-On: I542461e609866b21f597b0c4a2954807c5b8f8b7
Change-Id: I76aea67f4b00d038e56b9f67ad0af0c5328b249c
This commit is contained in:
Pierre Riteau 2016-12-07 12:10:04 +00:00
parent c6f75760de
commit e0621c9b62
1 changed files with 14 additions and 16 deletions

View File

@ -121,23 +121,21 @@ function create_blazar_accounts {
"$SERVICE_PASSWORD" "default" "blazar@example.com")
get_or_add_user_project_role $ADMIN_ROLE $BLAZAR_USER_ID $SERVICE_TENANT
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
BLAZAR_SERVICE=$(get_or_create_service "blazar" \
"reservation" "Blazar Reservations Service")
get_or_create_endpoint $BLAZAR_SERVICE \
"$REGION_NAME" \
"$BLAZAR_SERVICE_PROTOCOL://$BLAZAR_SERVICE_HOST:$BLAZAR_SERVICE_PORT/v1" \
"$BLAZAR_SERVICE_PROTOCOL://$BLAZAR_SERVICE_HOST:$BLAZAR_SERVICE_PORT/v1" \
"$BLAZAR_SERVICE_PROTOCOL://$BLAZAR_SERVICE_HOST:$BLAZAR_SERVICE_PORT/v1"
BLAZAR_SERVICE=$(get_or_create_service "blazar" \
"reservation" "Blazar Reservations Service")
get_or_create_endpoint $BLAZAR_SERVICE \
"$REGION_NAME" \
"$BLAZAR_SERVICE_PROTOCOL://$BLAZAR_SERVICE_HOST:$BLAZAR_SERVICE_PORT/v1" \
"$BLAZAR_SERVICE_PROTOCOL://$BLAZAR_SERVICE_HOST:$BLAZAR_SERVICE_PORT/v1" \
"$BLAZAR_SERVICE_PROTOCOL://$BLAZAR_SERVICE_HOST:$BLAZAR_SERVICE_PORT/v1"
KEYSTONEV3_SERVICE=$(get_or_create_service "keystonev3" \
"identityv3" "Keystone Identity Service V3")
get_or_create_endpoint $KEYSTONEV3_SERVICE \
"$REGION_NAME" \
"$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v3" \
"$KEYSTONE_AUTH_PROTOCOL://$KEYSTONE_AUTH_HOST:$KEYSTONE_AUTH_PORT/v3" \
"$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v3"
fi
KEYSTONEV3_SERVICE=$(get_or_create_service "keystonev3" \
"identityv3" "Keystone Identity Service V3")
get_or_create_endpoint $KEYSTONEV3_SERVICE \
"$REGION_NAME" \
"$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v3" \
"$KEYSTONE_AUTH_PROTOCOL://$KEYSTONE_AUTH_HOST:$KEYSTONE_AUTH_PORT/v3" \
"$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v3"
}