Created
April 1, 2020 15:45
-
-
Save goneri/55d3cafb5ce8acb9887a42b02ee23efc to your computer and use it in GitHub Desktop.
purge_volumes.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eux | |
function clean_up_volumes() { | |
openstack volume list -f value -c ID -c Status|awk '/available/ {print $1}'|xargs -r openstack volume delete | |
} | |
OS_CLOUD=vexxhost OS_REGION_NAME=ca-ymq-1 clean_up_volumes | |
OS_CLOUD=vexxhost OS_REGION_NAME=sjc1 clean_up_volumes | |
OS_CLOUD=limestone OS_REGION_NAME=us-slc clean_up_volumes | |
OS_CLOUD=limestone OS_REGION_NAME=us-dfw-1 clean_up_volumes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment