summaryrefslogtreecommitdiffstats
path: root/docker/cleanup_qtip_image.sh
blob: 9c2b59dbc8e858fcef607af6bd40564094c5f713 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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