summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Blaisonneau <david.blaisonneau@orange.com>2016-01-19 15:02:07 +0100
committerDavid Blaisonneau <david.blaisonneau@orange.com>2016-01-19 15:02:07 +0100
commitceaabffe95fccdf4b9764261df7180f38f463b6a (patch)
treed5f1f698797037b7ab87ccbbae3fdb64e39037e9
parentc9e0b03895cdbabb3c3f27f0b6ad627109ea8f02 (diff)
joid: set default network name for nova
Change-Id: I821e650c1349d279e16bbba8812080c12b2d5736 Signed-off-by: David Blaisonneau <david.blaisonneau@orange.com>
-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 ------"