[Rally] Add clean up script to neutron

Rally can leave behind rally-generated network and router in the neutron
helm test. This patch set adds in a clean up script to clean up these
rally-generated resources.

Change-Id: If7dc9e4e5a659657e8a7e32f6d94703992dcd193
Signed-off-by: Tin Lam <tin@irrational.io>
This commit is contained in:
Tin Lam 2020-02-19 10:43:17 -06:00
parent a1f8ff7531
commit 0b994a9c08

View File

@ -798,6 +798,15 @@ conf:
rally_tests:
force_project_purge: false
run_tempest: false
clean_up: |
ROUTERS=$(openstack router list -f value | grep -e "^[sc]_rally_" | awk '{ print $1 }')
if [ -n "$ROUTERS" ]; then
echo $ROUTERS | xargs openstack router delete
fi
NETWORKS=$(openstack network list -f value | grep -e "^[sc]_rally_" | awk '{ print $1 }')
if [ -n "$NETWORKS" ]; then
echo $NETWORKS | xargs openstack network delete
fi
tests:
NeutronNetworks.create_and_delete_networks:
- args: