diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2018-09-13 13:02:07 -0700 |
---|---|---|
committer | Gary Wu <gary.i.wu@huawei.com> | 2018-09-13 13:03:10 -0700 |
commit | 17cd90682335e8f06c63a883a02ca890f2efdfa7 (patch) | |
tree | 86d00b3d6558a29129138743e98431270ab52202 /test | |
parent | 05dd0489b19e86f84c80e344ba00882850f0e8b4 (diff) |
Only teardown items in active OpenStack tenant
Change-Id: I8de4507a18554fbf9a837eece1fba2aa5280cec8
Issue-ID: INT-611
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'test')
-rwxr-xr-x | test/ete/scripts/teardown-onap.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ete/scripts/teardown-onap.sh b/test/ete/scripts/teardown-onap.sh index 77b8233fa..4dad43e8f 100755 --- a/test/ete/scripts/teardown-onap.sh +++ b/test/ete/scripts/teardown-onap.sh @@ -51,14 +51,14 @@ if [ "$full_deletion" = true ];then sleep 10 # delete all instances - openstack server delete $(openstack server list -c ID -f value) + openstack server delete $(openstack server list -c ID -f value --project $OS_PROJECT_ID) sleep 1 # miscellaneous cleanup - openstack floating ip delete $(openstack floating ip list -c ID -f value) + openstack floating ip delete $(openstack floating ip list -c ID -f value --project $OS_PROJECT_ID) sleep 1 - ROUTERS=$(openstack router list -c ID -f value) + ROUTERS=$(openstack router list -c ID -f value --project $OS_PROJECT_ID) echo $ROUTERS for ROUTER in $ROUTERS; do echo $ROUTER; @@ -69,11 +69,11 @@ if [ "$full_deletion" = true ];then openstack router delete $ROUTER done - openstack port delete $(openstack port list -f value -c ID) - openstack volume delete $(openstack volume list -f value -c ID) + openstack port delete $(openstack port list -f value -c ID --project $OS_PROJECT_ID) + openstack volume delete $(openstack volume list -f value -c ID --project $OS_PROJECT_ID) # delete all except "default" security group - SECURITY_GROUPS=$(openstack security group list -c ID -f value | grep -v default) + SECURITY_GROUPS=$(openstack security group list -c ID -f value --project $OS_PROJECT_ID | grep -v default) openstack security group delete $SECURITY_GROUPS sleep 1 |