Regenerate tempest.conf every time

Select for active images

If we don't do this, repeat devstack installs won't be
able to use this script.

Change-Id: I95746ffebfa7163c80161d26de1e575c0fc5d39c
This commit is contained in:
Sean Dague 2012-05-03 11:52:55 -04:00
parent 8d6638e809
commit 0f5da00168

View File

@ -67,11 +67,12 @@ fi
# We ignore ramdisk and kernel images and set the IMAGE_UUID to # We ignore ramdisk and kernel images and set the IMAGE_UUID to
# the first image returned and set IMAGE_UUID_ALT to the second, # the first image returned and set IMAGE_UUID_ALT to the second,
# if there is more than one returned... # if there is more than one returned...
# ... Also ensure we only take active images, so we don't get snapshots in process
IMAGE_LINES=`glance image-list` IMAGE_LINES=`glance image-list`
IFS="$(echo -e "\n\r")" IFS="$(echo -e "\n\r")"
IMAGES="" IMAGES=""
for line in $IMAGE_LINES; do for line in $IMAGE_LINES; do
IMAGES="$IMAGES `echo $line | grep -v "^\(ID\|+--\)" | grep -v "\(aki\|ari\)" | cut -d' ' -f2`" IMAGES="$IMAGES `echo $line | grep -v "^\(ID\|+--\)" | grep -v "\(aki\|ari\)" | grep 'active' | cut -d' ' -f2`"
done done
# Create array of image UUIDs... # Create array of image UUIDs...
IFS=" " IFS=" "
@ -89,9 +90,8 @@ if [[ $NUM_IMAGES -gt 1 ]]; then
fi fi
# Create tempest.conf from tempest.conf.tpl # Create tempest.conf from tempest.conf.tpl
if [[ ! -r $TEMPEST_CONF ]]; then # copy every time, because the image UUIDS are going to change
cp $TEMPEST_CONF.tpl $TEMPEST_CONF cp $TEMPEST_CONF.tpl $TEMPEST_CONF
fi
IDENTITY_USE_SSL=${IDENTITY_USE_SSL:-False} IDENTITY_USE_SSL=${IDENTITY_USE_SSL:-False}
IDENTITY_HOST=${IDENTITY_HOST:-127.0.0.1} IDENTITY_HOST=${IDENTITY_HOST:-127.0.0.1}