aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/ete/scripts/teardown-onap.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/ete/scripts/teardown-onap.sh b/test/ete/scripts/teardown-onap.sh
index dbbee2816..3a40cfac8 100755
--- a/test/ete/scripts/teardown-onap.sh
+++ b/test/ete/scripts/teardown-onap.sh
@@ -11,10 +11,13 @@ source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh
# $WORKSPACE/test/ete/scripts/dns-zones/delete-dns-zones.sh $OS_PROJECT_NAME
# sleep 1
-# delete all Desigate DNS zones
+# delete all Desigate DNS zones belonging to this project
ZONES=$(openstack zone list -c "id" -f value)
for ZONE in ${ZONES}; do
- openstack zone delete $ZONE
+ ZONE_PROJECT_ID=$(openstack zone show $ZONE -f json | jq -r '.project_id')
+ if [ "$OS_PROJECT_ID" == "$ZONE_PROJECT_ID" ]; then
+ openstack zone delete $ZONE
+ fi
done
# delete all instances
@@ -31,7 +34,7 @@ for ROUTER in $ROUTERS; do
echo $ROUTER;
PORTS=$(openstack router show $ROUTER -c "interfaces_info" -f "value" | jq -r '.[].port_id')
for PORT in $PORTS; do
- openstack router remove port $ROUTER $PORT
+ openstack router remove port $ROUTER $PORT
done
openstack router delete $ROUTER
done