diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2016-09-27 13:33:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-09-27 13:33:13 +0000 |
commit | 2ac37969827ee55a32dc5fdd337cdeebf0bceb46 (patch) | |
tree | c23b8d3820cfec24b7395b601a874973051239e9 /docker/cleanup_qtip_image.sh | |
parent | 2d705000187bc5a786cff591966b0b6907105856 (diff) | |
parent | 1a2b55736da4d18758f81444933181e380202f60 (diff) |
Merge "code refactor: run_qtip.sh"
Diffstat (limited to 'docker/cleanup_qtip_image.sh')
-rw-r--r-- | docker/cleanup_qtip_image.sh | 24 |
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 |