aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorZhijunWei <wzj334965317@outlook.com>2018-04-28 15:41:54 +0000
committerZhijunWei <wzj334965317@outlook.com>2018-04-28 15:43:06 +0000
commit44b49adda1650d66f0c19c0a7a35352b854980cc (patch)
treeb9b802726c942c8e40b8f8cfb1e731b0d48c816e /tools
parentde1777134e87f0a6d6f41d79d0cdbde47fbf333a (diff)
downloadkolla-ansible-44b49adda1650d66f0c19c0a7a35352b854980cc.tar.gz
kolla-ansible-44b49adda1650d66f0c19c0a7a35352b854980cc.zip
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/init-vpn6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/init-vpn b/tools/init-vpn
index 4a7271dbb..bdcc85c4b 100755
--- a/tools/init-vpn
+++ b/tools/init-vpn
@@ -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'