summaryrefslogtreecommitdiffstats
path: root/test/ete/scripts/deploy-onap.sh
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-10-30 11:52:40 -0700
committerGary Wu <gary.i.wu@huawei.com>2017-10-30 11:52:40 -0700
commitbd894605b23edf0ed796540bbc6fa80f33030005 (patch)
treee27fede61d999a7b67738e2319db72f08580069e /test/ete/scripts/deploy-onap.sh
parentb84428e1c7e0ae6bfffdb72bdf532280d09fdc90 (diff)
Update .env file to match latest heat template
Change-Id: Ia16b1f2cc8c399f47bb20ae9f1df7e492fe9baf5 Issue-ID: INT-278 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'test/ete/scripts/deploy-onap.sh')
-rwxr-xr-xtest/ete/scripts/deploy-onap.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/ete/scripts/deploy-onap.sh b/test/ete/scripts/deploy-onap.sh
index 5d488c1ca..69296ab17 100755
--- a/test/ete/scripts/deploy-onap.sh
+++ b/test/ete/scripts/deploy-onap.sh
@@ -8,13 +8,18 @@ source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh
# Delete all existing stacks
STACKS=$(openstack stack list -c "Stack Name" -f value)
-echo "Deleting Stacks ${STACKS}"
-openstack stack delete -y $STACKS
+if [ ! -z "${STACKS}" ]; then
+ echo "Deleting Stacks ${STACKS}"
+ openstack stack delete -y $STACKS
+else
+ echo "No existing stacks to delete."
+fi
STACK="ete-$(uuidgen | cut -c-8)"
echo "New Stack Name: ${STACK}"
+cp ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-demo.env
envsubst < ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-template.env > ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env
openstack stack create -t ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml -e ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env $STACK