download fedora x86_64 image if heat is enabled

clean up the logic around producing a valid cfn image for heat
testing. If heat is enabled, add the f20 x86_64 imageurl to the
list of images that we support, and set that as the tempest
orchestration image.

The crux of this change is left commented out for now because we
need a two phase update of nodepool content before we can move
away from the old image (otherwise fedora mirrors will kill us
with bad downloads).

Change-Id: I1da9f259a3267b1bd27e9899755204c8fff41153
diff --git a/stackrc b/stackrc
index 4418be1..8320c9b 100644
--- a/stackrc
+++ b/stackrc
@@ -341,11 +341,23 @@
         IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz"};;
 esac
 
+# if heat is enabled, bring in a linux image with cfn enabled
+# TODO(sdague) this next block can be removed after nodepool has the 64bit image in it's cache
 HEAT_FETCHED_TEST_IMAGE=${HEAT_FETCHED_TEST_IMAGE:-""}
 if [[ "$HEAT_FETCHED_TEST_IMAGE" == "Fedora-i386-20-20131211.1-sda" ]]; then
+    HEAT_CFN_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/i386/$HEAT_FETCHED_TEST_IMAGE.qcow2"
     IMAGE_URLS+=",https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/i386/$HEAT_FETCHED_TEST_IMAGE.qcow2"
+elif [[ "$HEAT_FETCHED_TEST_IMAGE" == "Fedora-x86_64-20-20131211.1-sda" ]]; then
+    HEAT_CFN_IMAGE_URL="https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2"
+    IMAGE_URLS+=",https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2"
 fi
 
+# Uncomment after nodepool changes land
+#if [[ "$ENABLED_SERVICES" =~ 'h-api' ]]; then
+#    HEAT_CFN_IMAGE_URL=${HEAT_CFN_IMAGE_URL:-"https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2"}
+#    IMAGE_URLS+=",$HEAT_CFN_IMAGE_URL"
+#fi
+
 # 10Gb default volume backing file size
 VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-10250M}