summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorAric Gardner <agardner@linuxfoundation.org>2016-01-19 14:49:24 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-19 14:49:24 +0000
commit44c43d0c96a233286ba2259ea2aac425b3ab861a (patch)
treec715a81d87a903f8fd3edfefbeaaef723bd809d6 /jjb
parent43c17ad54175d117e23c07e43ff36108749523ff (diff)
parentceaabffe95fccdf4b9764261df7180f38f463b6a (diff)
Merge "joid: set default network name for nova"
Diffstat (limited to 'jjb')
-rw-r--r--jjb/joid/joid-deploy.sh31
1 files changed, 20 insertions, 11 deletions
diff --git a/jjb/joid/joid-deploy.sh b/jjb/joid/joid-deploy.sh
index 51ddb313e..991a2bc5a 100644
--- a/jjb/joid/joid-deploy.sh
+++ b/jjb/joid/joid-deploy.sh
@@ -50,6 +50,20 @@ fi
export POD_NAME=${POD/-}
##
+## Parse Network config
+##
+
+EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-}
+# split EXTERNAL_NETWORK=name;type;first ip;last ip; gateway;network
+IFS=';' read -r -a EXTNET <<< "$EXTERNAL_NETWORK"
+EXTNET_NAME=${EXTNET[0]}
+EXTNET_TYPE=${EXTNET[1]}
+EXTNET_FIP=${EXTNET[2]}
+EXTNET_LIP=${EXTNET[3]}
+EXTNET_GW=${EXTNET[4]}
+EXTNET_NET=${EXTNET[5]}
+
+##
## Redeploy MAAS or recover the previous config
##
@@ -101,11 +115,15 @@ SRCBUNDLE="${WORKSPACE}/ci/${SDN_CONTROLLER}/juju-deployer/"
SRCBUNDLE="${SRCBUNDLE}/ovs-${SDN_CONTROLLER}-${HA_MODE}.yaml"
-# Modify files
-
+# Modify Bundle
echo "------ Set openstack password ------"
sed -i -- "s/\"admin-password\": openstack/\"admin-password\": $OS_ADMIN_PASSWORD/" $SRCBUNDLE
+if [ -n "$EXTNET_NAME" ]; then
+ echo "------ Set openstack default network ------"
+ sed -i -- "s/\"neutron-external-network\": ext_net/\"neutron-external-network\": $EXTNET_NAME/" $SRCBUNDLE
+fi
+
echo "------ Set ceph disks ------"
CEPH_DISKS_CONTROLLERS=${CEPH_DISKS_CONTROLLERS:-}
if [ -z "$CEPH_DISKS_CONTROLLERS" ]; then
@@ -178,15 +196,6 @@ exit_on_error $? "Deploy FAILED to auth to openstack"
## Create external network if needed
##
-EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-}
-# split EXTERNAL_NETWORK=name;type;first ip;last ip; gateway;network
-IFS=';' read -r -a EXTNET <<< "$EXTERNAL_NETWORK"
-EXTNET_NAME=${EXTNET[0]}
-EXTNET_TYPE=${EXTNET[1]}
-EXTNET_FIP=${EXTNET[2]}
-EXTNET_LIP=${EXTNET[3]}
-EXTNET_GW=${EXTNET[4]}
-EXTNET_NET=${EXTNET[5]}
# If we have more information than only the name, try to create it
if [ -z "$EXTNET_TYPE" ]; then
echo "------ No data for external network creation, pass ------"