summaryrefslogtreecommitdiffstats
path: root/docker/cleanup_qtip_image.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docker/cleanup_qtip_image.sh')
-rw-r--r--docker/cleanup_qtip_image.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/docker/cleanup_qtip_image.sh b/docker/cleanup_qtip_image.sh
new file mode 100644
index 00000000..9c2b59db
--- /dev/null
+++ b/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