Fix for cleanup.sh in server deleting and updated mask
Change-Id: I1ea52ed70d08938bdca70f21610a6a6272b01362
diff --git a/cleanup.sh b/cleanup.sh
index 05d154f..43f7d83 100755
--- a/cleanup.sh
+++ b/cleanup.sh
@@ -1,6 +1,6 @@
#!/bin/bash
export OS_INTERFACE='admin'
-mask='rally_\|tempest_\|tempest-'
+mask='s_rally\|rally_\|tempest_\|tempest-'
dry_run=false
clean_projects=false
make_servers_active=false
@@ -69,7 +69,7 @@
### Servers
function _clean_servers {
- servers=( $(openstack server list --name ${mask} -c ID -f value) )
+ servers=( $(openstack server list -c ID -c Name -f value --all | grep "${mask}" | cut -d' ' -f1) )
echo "-> ${#servers[@]} servers containing '${mask}' found"
if [ "$make_servers_active" = true ]; then
printf "%s\n" ${servers[@]} | xargs -I{} echo server set --state active {} >>${cmds}