devstack: support publicURL retrieval in both keystone v2/v3 format
Recent devstack commit Ia792b23119c00089542ba08879dca1c29dc80945 revert keystone to use V2 api again, we need to support both v2/v3 output format. Change-Id: Ib51769336331872dc33a18097718d1cb54643d5e Co-Authored-By: Lianhao Lu <lianhao.lu@intel.com>
This commit is contained in:
parent
5201b5eb73
commit
7663c9562b
@ -36,8 +36,13 @@ if [ -d $BASE/new/devstack ]; then
|
||||
STACK_USER=stack
|
||||
sudo chown -R $STACK_USER:stack $AODH_DIR
|
||||
source $BASE/new/devstack/openrc admin admin
|
||||
if [ $OS_IDENTITY_API_VERSION == '2.0' ]; then
|
||||
urltag='publicURL'
|
||||
else
|
||||
urltag='public'
|
||||
fi
|
||||
openstack catalog list
|
||||
export AODH_SERVICE_URL=$(openstack catalog show alarming -c endpoints -f value | awk '/public/{print $2}')
|
||||
export AODH_SERVICE_URL=$(openstack catalog show alarming -c endpoints -f value | awk "/$urltag"'/{print $2}')
|
||||
export AODH_SERVICE_TOKEN=$(openstack token issue -c id -f value)
|
||||
# Go to the aodh dir
|
||||
cd $AODH_DIR
|
||||
|
Loading…
Reference in New Issue
Block a user