Add test for credentials set

the /etc/kolla/adminrc.sh should be export before
init vpn script, this ps to add test for credentials
set to avoid it missing.

Change-Id: Ib849d5f5804221c507c2466f2f08179340188c24
(cherry picked from commit 44b49adda1)
This commit is contained in:
ZhijunWei 2018-04-28 15:41:54 +00:00 committed by zhulingjie
parent d22a4e5655
commit 33e6a4a97d
1 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,12 @@
# Script originally copied from https://wiki.openstack.org/wiki/Neutron/VPNaaS/HowToInstall
# Test for credentials set
if [[ "${OS_USERNAME}" == "" ]]; then
echo "No Keystone credentials specified. Try running source openrc"
exit
fi
EXT_NW_ID=`neutron net-list | awk '/public/{print $2}'`
WEST_SUBNET='192.168.1.0/24'
EAST_SUBNET='192.168.2.0/24'