Skip to content

Instantly share code, notes, and snippets.

@kjorg50
Created November 7, 2016 23:18
Show Gist options
  • Save kjorg50/4c15c5676729792d3d69677d44935bb8 to your computer and use it in GitHub Desktop.
Save kjorg50/4c15c5676729792d3d69677d44935bb8 to your computer and use it in GitHub Desktop.
#!/bin/bash
# ignore the 'tempest' projects and users since those are created by chef
for i in server image domain role network subnet volume keypair; do
echo = cleaning $i list =
for j in $(openstack $i list | grep tempest | awk '{print $2}'); do
if [ $i = 'domain' ]; then
openstack $i set --disable $j && openstack $i delete $j
else
openstack $i delete $j
fi
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment