summaryrefslogtreecommitdiffstats
path: root/ci/openstack.sh
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2016-06-09 11:07:20 -0500
committerNarinder Gupta <narinder.gupta@canonical.com>2016-06-09 11:39:41 -0500
commit8d92025d7d812708d800e982f4310674d5c445df (patch)
tree48990bd14be0916dc77f51af42a8ac1e9389bc12 /ci/openstack.sh
parent3445cf6b9610aca5ea94e786735ee482151194a3 (diff)
modified cengn pod1 as per details provided.
Change-Id: Ic92d99a237cd82d0d3429d952b5a561a1c1efc8b Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/openstack.sh')
-rwxr-xr-xci/openstack.sh22
1 files changed, 12 insertions, 10 deletions
diff --git a/ci/openstack.sh b/ci/openstack.sh
index 89194ded..07687e7e 100755
--- a/ci/openstack.sh
+++ b/ci/openstack.sh
@@ -69,20 +69,22 @@ neutron net-create ext-net --shared --router:external --provider:physical_networ
## Parse Network config
##
-EXTERNAL_NETWORK=`grep floating-ip-range deployconfig.yaml | cut -d ' ' -f 4 `
+if [ -f ./deployconfig.yaml ];then
+ EXTERNAL_NETWORK=`grep floating-ip-range deployconfig.yaml | cut -d ' ' -f 4 `
-# split EXTERNAL_NETWORK=first ip;last ip; gateway;network
+ # split EXTERNAL_NETWORK=first ip;last ip; gateway;network
-EXTNET=(${EXTERNAL_NETWORK//,/ })
+ EXTNET=(${EXTERNAL_NETWORK//,/ })
-EXTNET_FIP=${EXTNET[0]}
-EXTNET_LIP=${EXTNET[1]}
-EXTNET_GW=${EXTNET[2]}
-EXTNET_NET=${EXTNET[3]}
+ EXTNET_FIP=${EXTNET[0]}
+ EXTNET_LIP=${EXTNET[1]}
+ EXTNET_GW=${EXTNET[2]}
+ EXTNET_NET=${EXTNET[3]}
-neutron subnet-create ext-net --name ext-subnet \
- --allocation-pool start=$EXTNET_FIP,end=$EXTNET_LIP \
- --disable-dhcp --gateway $EXTNET_GW $EXTNET_NET
+ neutron subnet-create ext-net --name ext-subnet \
+ --allocation-pool start=$EXTNET_FIP,end=$EXTNET_LIP \
+ --disable-dhcp --gateway $EXTNET_GW $EXTNET_NET
+fi
# create vm network
neutron net-create demo-net