Delete all existing stacks on deploy 33/20233/1
authorGary Wu <gary.i.wu@huawei.com>
Mon, 23 Oct 2017 20:12:06 +0000 (13:12 -0700)
committerGary Wu <gary.i.wu@huawei.com>
Mon, 23 Oct 2017 20:12:06 +0000 (13:12 -0700)
Change-Id: If325394527354d7e86c6fef67a91fcd1da08bd6c
Issue-ID: INT-278
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
test/ete/scripts/deploy-onap.sh

index 353c7c7..69c6dfb 100755 (executable)
@@ -46,8 +46,14 @@ else
 fi
 
 
+# Delete all existing stacks
+STACKS=$(openstack stack list -c "Stack Name" -f value)
+for stack in "${STACKS[@]}"; do
+    echo "Deleting Old Stack ${stack}"
+    openstack stack delete -y $stack
+done
 
 STACK="ete-$(uuidgen | cut -c-8)"
-echo "Stack Name: ${STACK}"
+echo "New Stack Name: ${STACK}"
 openstack stack create -t ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml -e ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env $STACK