blob: 69296ab173ce13eeddabd9ab7d9711ed0bcdc421 [file] [log] [blame]
Gary Wu874794d2017-10-13 12:27:39 -07001#!/bin/bash
2
Gary Wu874794d2017-10-13 12:27:39 -07003if [ -z "$WORKSPACE" ]; then
4 export WORKSPACE=`git rev-parse --show-toplevel`
5fi
6
Gary Wu838c34d2017-10-23 14:22:40 -07007source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh
Gary Wu874794d2017-10-13 12:27:39 -07008
Gary Wu99a7c1a2017-10-23 13:12:06 -07009# Delete all existing stacks
10STACKS=$(openstack stack list -c "Stack Name" -f value)
Gary Wubd894602017-10-30 11:52:40 -070011if [ ! -z "${STACKS}" ]; then
12 echo "Deleting Stacks ${STACKS}"
13 openstack stack delete -y $STACKS
14else
15 echo "No existing stacks to delete."
16fi
Gary Wu874794d2017-10-13 12:27:39 -070017
18STACK="ete-$(uuidgen | cut -c-8)"
Gary Wu99a7c1a2017-10-23 13:12:06 -070019echo "New Stack Name: ${STACK}"
Gary Wub84428e2017-10-30 11:09:27 -070020
21
Gary Wubd894602017-10-30 11:52:40 -070022cp ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-demo.env
Gary Wub84428e2017-10-30 11:09:27 -070023envsubst < ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-template.env > ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env
24
Gary Wua770e642017-10-23 12:30:29 -070025openstack stack create -t ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml -e ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env $STACK
Gary Wu874794d2017-10-13 12:27:39 -070026