diff options
Diffstat (limited to 'legacy/docker/cleanup_qtip_image.sh')
-rw-r--r-- | legacy/docker/cleanup_qtip_image.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/legacy/docker/cleanup_qtip_image.sh b/legacy/docker/cleanup_qtip_image.sh new file mode 100644 index 00000000..9c2b59db --- /dev/null +++ b/legacy/docker/cleanup_qtip_image.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +if [[ ! -f ${QTIP_DIR}/openrc ]];then + source ${REPOS_DIR}/releng/utils/fetch_os_creds.sh \ + -d ${QTIP_DIR}/openrc \ + -i ${INSTALLER_TYPE} \ + -a ${INSTALLER_IP} +fi + +source ${QTIP_DIR}/openrc + +cleanup_image() +{ + echo + if ! glance image-list; then + return + fi + + echo "Deleting image QTIP_CentOS..." + glance image-delete $(glance image-list | grep -e QTIP_CentOS | awk '{print $2}') + +} + +cleanup_image |