Added cleaning of openstack services after Tempest run
Added cleaning of servics at the cleanup script. The tempest
services can appear after Tempest run (identity set).
PROD: PROD-36829
Change-Id: Ibc9af03f995df4493465b2ccf65fed3883bcbeea
diff --git a/cleanup.sh b/cleanup.sh
index 838f397..415d53c 100644
--- a/cleanup.sh
+++ b/cleanup.sh
@@ -253,6 +253,14 @@
_clean_and_flush
}
+### Services
+function _clean_services {
+ services=( $(openstack service list -c Name -f value | grep ${mask} | grep -v ${exclude}) )
+ echo "-> ${#services[@]} services containing '${mask}' found"
+ printf "%s\n" ${services[@]} | xargs -I{} echo service delete {} >>${cmds}
+ _clean_and_flush
+}
+
### Stacks
function _clean_stacks {
# By default openstack denies use of global_index for everyone.
@@ -322,6 +330,7 @@
_clean_keypairs
_clean_routers_and_networks
_clean_regions
+_clean_services
_clean_containers
# project cleaning disabled by default