Remove workaround for POST image updating
This commit reverts I489fb6e0f7fe6c85c78b34329eb0a03a37cb0e77 Until bug will be fixed, we will use Glance API v2. Also fix delete function. Change-Id: If92f635b409860f0e4a6deb3048668db612aecfb
This commit is contained in:
parent
558ded4a0c
commit
0b66d97508
@ -21,9 +21,10 @@ cleanup_image() {
|
||||
}
|
||||
|
||||
delete_image() {
|
||||
# "|| true" here, to avoid error code producing in case of missing image
|
||||
id=$(glance image-list | grep $1 | awk '{print $2}')
|
||||
glance image-delete $id || true
|
||||
id=$(glance image-list | grep -w $1 | awk '{print $2}')
|
||||
if [ -n "$id" ]; then
|
||||
glance image-delete $id
|
||||
fi
|
||||
}
|
||||
|
||||
failure() {
|
||||
@ -42,13 +43,9 @@ register_new_image() {
|
||||
|
||||
rename_image() {
|
||||
# 1 - source image, 2 - target image
|
||||
# Workaround for #1173044
|
||||
tmux new-session -d -s image "glance --debug image-update $1 --name $2 |& tee /tmp/glance-image-update.log"
|
||||
sleep 10
|
||||
cat /tmp/glance-image-update.log
|
||||
STATUS=$(grep -q -w 'Property' /tmp/glance-image-update.log; echo $?)
|
||||
exit $STATUS
|
||||
# end workaround
|
||||
id=$(glance image-list | grep -w $1 | awk '{print $2}')
|
||||
# Use v2 API Glance version as workaround for #1173044
|
||||
glance --debug --os-image-api-version 2 image-update "$id" --name $2
|
||||
}
|
||||
|
||||
upload_image() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user