blob: fa6b92ebb0d978793930a3cdefb4e636ae08233e [file] [log] [blame]
Sean Dague0936e672014-04-03 14:48:48 -04001#!/bin/bash
2
3# Keep track of the devstack directory
4TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
5
6source $TOP_DIR/functions
7
8# Possible virt drivers, if we have more, add them here. Always keep
9# dummy in the end position to trigger the fall through case.
10DRIVERS="openvz ironic libvirt vsphere xenserver dummy"
11
12# Extra variables to trigger getting additional images.
13ENABLED_SERVICES=h-api
14HEAT_FETCHED_TEST_IMAGE="Fedora-i386-20-20131211.1-sda"
15
16# Loop over all the virt drivers and collect all the possible images
17ALL_IMAGES=""
18for driver in $DRIVERS; do
19 VIRT_DRIVER=$driver
20 URLS=$(source $TOP_DIR/stackrc && echo $IMAGE_URLS)
21 if [[ ! -z "$ALL_IMAGES" ]]; then
22 ALL_IMAGES+=,
23 fi
24 ALL_IMAGES+=$URLS
25done
26
27# Make a nice list
28echo $ALL_IMAGES | tr ',' '\n' | sort | uniq
29
30# Sanity check - ensure we have a minimum number of images
31num=$(echo $ALL_IMAGES | tr ',' '\n' | sort | uniq | wc -l)
32if [[ "$num" -lt 5 ]]; then
33 echo "ERROR: We only found $num images in $ALL_IMAGES, which can't be right."
34 exit 1
35fi