blob: 204280704e14608d186cf3f9893c353a617134c1 [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
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
Joe Gordon71e82f52015-02-25 11:39:18 -080012CIRROS_ARCHS="x86_64 i386"
13
Sean Dague0936e672014-04-03 14:48:48 -040014# Extra variables to trigger getting additional images.
Sean Daguefafb62b2014-06-30 16:49:30 -040015export ENABLED_SERVICES="h-api,tr-api"
Sean Dague0936e672014-04-03 14:48:48 -040016HEAT_FETCHED_TEST_IMAGE="Fedora-i386-20-20131211.1-sda"
Sean Dagueb6238602014-04-17 21:56:53 -040017PRECACHE_IMAGES=True
Sean Dague0936e672014-04-03 14:48:48 -040018
19# Loop over all the virt drivers and collect all the possible images
20ALL_IMAGES=""
21for driver in $DRIVERS; do
Joe Gordon71e82f52015-02-25 11:39:18 -080022 for arch in $CIRROS_ARCHS; do
23 CIRROS_ARCH=$arch
24 VIRT_DRIVER=$driver
25 URLS=$(source $TOP_DIR/stackrc && echo $IMAGE_URLS)
26 if [[ ! -z "$ALL_IMAGES" ]]; then
27 ALL_IMAGES+=,
28 fi
29 ALL_IMAGES+=$URLS
30 done
Sean Dague0936e672014-04-03 14:48:48 -040031done
32
33# Make a nice list
34echo $ALL_IMAGES | tr ',' '\n' | sort | uniq
35
36# Sanity check - ensure we have a minimum number of images
37num=$(echo $ALL_IMAGES | tr ',' '\n' | sort | uniq | wc -l)
38if [[ "$num" -lt 5 ]]; then
39 echo "ERROR: We only found $num images in $ALL_IMAGES, which can't be right."
40 exit 1
41fi