Minor tweak setup-service tool

This patch revises setup-service tool to make it get default
region name from environment variables when setting up senlin
service.

Change-Id: I654905915ce47be4b73847ac0e99bcf5f60b79d2
This commit is contained in:
yanyanhu 2016-02-22 04:52:18 -05:00
parent 15f046eee2
commit 6131802e3f
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ fi
PORT=8778
HOST=$1 # Put your host IP here
SVC_PASSWD=$2
OS_REGION_NAME=${OS_REGION_NAME:-RegionOne}
SERVICE_ID=$(openstack service show senlin -f value -cid 2>/dev/null)
if [[ -z $SERVICE_ID ]]; then
@ -39,7 +40,7 @@ openstack endpoint create \
--adminurl "http://$HOST:$PORT" \
--publicurl "http://$HOST:$PORT" \
--internalurl "http://$HOST:$PORT" \
--region RegionOne \
--region $OS_REGION_NAME \
senlin
openstack user create \