Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions clean-ci-resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,17 @@ for resource in 'loadbalancer' 'server' 'router' 'subnet' 'network' 'volume snap
echo "$r" | report $resource | xargs --verbose openstack $resource delete
done
;;
subnet)
for r in $(./stale.sh -q "$resource"); do
network=$(openstack subnet show "$r" -c network_id -f value)
ports=$(openstack port list --network "$network" -f value -c id)
for port in $ports; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered adding port to the list above?

for resource in 'loadbalancer' 'server' 'router' 'PORT' 'subnet' '

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I have, but didn't to do it because we'll probably have to handle too many exceptions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok then, let's see how this goes.

echo "$port" | report port | xargs --verbose openstack port delete
done
# shellcheck disable=SC2086
echo "$r" | report $resource | xargs --verbose openstack $resource delete
done
;;
*)
# shellcheck disable=SC2086
./stale.sh -q $resource | report $resource | xargs --verbose --no-run-if-empty openstack $resource delete
Expand Down