exit 0
fi
-# we only support k8s scenario deployment on openstack as of now
-if [[ "$DEPLOY_SCENARIO" != "k8-*" ]] && [[ "$PROVISIONER_TYPE" == "heat" ]]; then
+# do not delete the stack if not explicitly set to delete
+if [[ "$DELETE_STACK" != "yes" ]]; then
echo "-------------------------------------------------------------------------"
- echo "Info: Only k8s scenario deployment on OpenStack has been implemented!"
+ echo "Info: Stack will not be deleted upon the completion of the job!"
echo "-------------------------------------------------------------------------"
exit 0
fi
-if [[ "$DELETE_STACK" != "yes" ]]; then
+# k8s and onap scenario have stacks so exit for others
+if [[ ! "$DEPLOY_SCENARIO" =~ ^k8-.*|^onap-.* ]]; then
echo "-------------------------------------------------------------------------"
- echo "Info: Stack will not be deleted upon the completion of the job!"
+ echo "Info: Nothing to delete!"
echo "-------------------------------------------------------------------------"
exit 0
fi