Merge "Avoid except exit due to no TestVM image"
This commit is contained in:
commit
9c28fdb53a
|
@ -14,7 +14,7 @@ function replace_test_image {
|
||||||
local image_file
|
local image_file
|
||||||
image_file="$3"
|
image_file="$3"
|
||||||
|
|
||||||
image_id=$(glance image-list | grep "$image_name" | awk -F "|" '{print $2}' | grep -v '^$')
|
image_id=$(glance image-list | awk -F "|" '/'$image_name'/ {print $2}')
|
||||||
|
|
||||||
if [[ -n "$image_id" ]]; then
|
if [[ -n "$image_id" ]]; then
|
||||||
echo "Delete image $image_name" >> $LOG_FILE
|
echo "Delete image $image_name" >> $LOG_FILE
|
||||||
|
|
Loading…
Reference in New Issue