Browse code

Don't hardcode glance protocol when finding trove guest image

This allows configuration of trove when devstack is configured
for SSL or tls-proxy.

Change-Id: I680effda94926951f9068e2df1e354c708aa4495

Rob Crittenden authored on 2014/10/31 08:49:20
Showing 1 changed files
... ...
@@ -207,7 +207,7 @@ function init_trove {
207 207
     # The image is uploaded by stack.sh -- see $IMAGE_URLS handling
208 208
     GUEST_IMAGE_NAME=$(basename "$TROVE_GUEST_IMAGE_URL")
209 209
     GUEST_IMAGE_NAME=${GUEST_IMAGE_NAME%.*}
210
-    TROVE_GUEST_IMAGE_ID=$(openstack --os-token $TOKEN --os-url http://$GLANCE_HOSTPORT image list | grep "${GUEST_IMAGE_NAME}" | get_field 1)
210
+    TROVE_GUEST_IMAGE_ID=$(openstack --os-token $TOKEN --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT image list | grep "${GUEST_IMAGE_NAME}" | get_field 1)
211 211
     if [ -z "$TROVE_GUEST_IMAGE_ID" ]; then
212 212
         # If no glance id is found, skip remaining setup
213 213
         echo "Datastore ${TROVE_DATASTORE_TYPE} will not be created: guest image ${GUEST_IMAGE_NAME} not found."