mirror of
https://github.com/optim-enterprises-bv/openstack-helm.git
synced 2025-12-27 02:04:53 +00:00
fix(rally): update cleanup
The cleanup script used for router, network, server, and flavor does not account for the first column being the resource ID. Matching via ^[sc]_rally will always result in an empty return. This fix now correctly matches the the name of the second column. This also fixes an issue where rally creates flavor as "private", adding --all so it cleans up the private flavors as well. Change-Id: Id1a0e31e56b51fd92a95e8588d259ce21fa839d6 Signed-off-by: Tin Lam <tin@irrational.io>
This commit is contained in:
@@ -793,11 +793,11 @@ conf:
|
||||
force_project_purge: false
|
||||
run_tempest: false
|
||||
clean_up: |
|
||||
ROUTERS=$(openstack router list -f value | grep -e "^[sc]_rally_" | awk '{ print $1 }')
|
||||
ROUTERS=$(openstack router list -f value | awk '$2 ~ /^[sc]_rally_/ { 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 }')
|
||||
NETWORKS=$(openstack network list -f value | awk '$2 ~ /^[sc]_rally_/ { print $1 }')
|
||||
if [ -n "$NETWORKS" ]; then
|
||||
echo $NETWORKS | xargs openstack network delete
|
||||
fi
|
||||
|
||||
@@ -617,11 +617,11 @@ conf:
|
||||
rally_tests:
|
||||
run_tempest: false
|
||||
clean_up: |
|
||||
FLAVORS=$(openstack flavor list -f value | grep -e "^s_rally_" | awk '{ print $1 }')
|
||||
FLAVORS=$(openstack flavor list -f value --all | awk '$2 ~ /^s_rally_/ { print $1 }')
|
||||
if [ -n "$FLAVORS" ]; then
|
||||
echo $FLAVORS | xargs openstack flavor delete
|
||||
fi
|
||||
SERVERS=$(openstack server list -f value | grep -e "^s_rally_" | awk '{ print $1 }')
|
||||
SERVERS=$(openstack server list -f value --all | awk '$2 ~ /^s_rally_/ { print $1 }')
|
||||
if [ -n "$SERVERS" ]; then
|
||||
echo $SERVERS | xargs openstack server delete
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user