update devstack plugin script

remove KEYSTONE_CATALOG_BACKEND because it was removed
from devstack.

Change-Id: Iea4784f95ba2fb3a8f8fc345c429b1639331e4d1
This commit is contained in:
Andrey Pavlov 2016-02-11 21:03:15 +03:00
parent b7e1e6f7c4
commit 08a9ff7543
1 changed files with 25 additions and 28 deletions

View File

@ -57,35 +57,32 @@ function recreate_endpoint {
local port=$3
local protocol=$4
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
# Remove nova's service/endpoint
local endpoint_ids=$(openstack --os-identity-api-version 3 endpoint list \
--service "$endpoint" --region "$REGION_NAME" -c ID -f value)
if [[ -n "$endpoint_ids" ]]; then
for endpoint_id in $endpoint_ids ; do
openstack --os-identity-api-version 3 endpoint delete $endpoint_id
done
fi
local service_id=$(openstack --os-identity-api-version 3 service list \
-c "ID" -c "Name" \
| grep " $endpoint " | get_field 1)
if [[ -n "$service_id" ]]; then
openstack --os-identity-api-version 3 service delete $service_id
fi
local service_id=$(openstack service create \
$endpoint \
--name "$endpoint" \
--description="$description" \
-f value -c id)
openstack --os-identity-api-version 3 endpoint create --region "$REGION_NAME" \
$service_id public "$protocol://$SERVICE_HOST:$port/"
openstack --os-identity-api-version 3 endpoint create --region "$REGION_NAME" \
$service_id admin "$protocol://$SERVICE_HOST:$port/"
openstack --os-identity-api-version 3 endpoint create --region "$REGION_NAME" \
$service_id internal "$protocol://$SERVICE_HOST:$port/"
# Remove nova's service/endpoint
local endpoint_ids=$(openstack --os-identity-api-version 3 endpoint list \
--service "$endpoint" --region "$REGION_NAME" -c ID -f value)
if [[ -n "$endpoint_ids" ]]; then
for endpoint_id in $endpoint_ids ; do
openstack --os-identity-api-version 3 endpoint delete $endpoint_id
done
fi
local service_id=$(openstack --os-identity-api-version 3 service list \
-c "ID" -c "Name" \
| grep " $endpoint " | get_field 1)
if [[ -n "$service_id" ]]; then
openstack --os-identity-api-version 3 service delete $service_id
fi
local service_id=$(openstack service create \
$endpoint \
--name "$endpoint" \
--description="$description" \
-f value -c id)
openstack --os-identity-api-version 3 endpoint create --region "$REGION_NAME" \
$service_id public "$protocol://$SERVICE_HOST:$port/"
openstack --os-identity-api-version 3 endpoint create --region "$REGION_NAME" \
$service_id admin "$protocol://$SERVICE_HOST:$port/"
openstack --os-identity-api-version 3 endpoint create --region "$REGION_NAME" \
$service_id internal "$protocol://$SERVICE_HOST:$port/"
}