blob: 27b3d4612dcaba6821ac924e519450f8de7c4644 [file] [log] [blame]
Sean Dague0936e672014-04-03 14:48:48 -04001#!/bin/bash
2
Dean Troyerdc97cb72015-03-28 08:20:50 -05003# Keep track of the DevStack directory
Sean Dague0936e672014-04-03 14:48:48 -04004TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
5
Jens Rosenboomff70dad2015-07-01 15:22:53 +02006# The following "source" implicitly calls get_default_host_ip() in
7# stackrc and will die if the selected default IP happens to lie
8# in the default ranges for FIXED_RANGE or FLOATING_RANGE. Since we
9# do not really need HOST_IP to be properly set in the remainder of
10# this script, just set it to some dummy value and make stackrc happy.
11HOST_IP=SKIP
Sean Dague0936e672014-04-03 14:48:48 -040012source $TOP_DIR/functions
13
14# Possible virt drivers, if we have more, add them here. Always keep
15# dummy in the end position to trigger the fall through case.
16DRIVERS="openvz ironic libvirt vsphere xenserver dummy"
17
18# Extra variables to trigger getting additional images.
Sean Daguefafb62b2014-06-30 16:49:30 -040019export ENABLED_SERVICES="h-api,tr-api"
Sean Dague0936e672014-04-03 14:48:48 -040020HEAT_FETCHED_TEST_IMAGE="Fedora-i386-20-20131211.1-sda"
Sean Dagueb6238602014-04-17 21:56:53 -040021PRECACHE_IMAGES=True
Sean Dague0936e672014-04-03 14:48:48 -040022
23# Loop over all the virt drivers and collect all the possible images
24ALL_IMAGES=""
25for driver in $DRIVERS; do
Joe Gordon33ba7382015-04-06 10:25:54 -070026 VIRT_DRIVER=$driver
27 URLS=$(source $TOP_DIR/stackrc && echo $IMAGE_URLS)
28 if [[ ! -z "$ALL_IMAGES" ]]; then
29 ALL_IMAGES+=,
30 fi
31 ALL_IMAGES+=$URLS
Sean Dague0936e672014-04-03 14:48:48 -040032done
33
34# Make a nice list
35echo $ALL_IMAGES | tr ',' '\n' | sort | uniq
36
37# Sanity check - ensure we have a minimum number of images
38num=$(echo $ALL_IMAGES | tr ',' '\n' | sort | uniq | wc -l)
39if [[ "$num" -lt 5 ]]; then
40 echo "ERROR: We only found $num images in $ALL_IMAGES, which can't be right."
41 exit 1
42fi