summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Carrez <thierry@openstack.org>2011-01-27 17:50:50 +0000
committerTarmac <>2011-01-27 17:50:50 +0000
commite70e9cdd4fe91d61cb5292699ff1ce20842bbc17 (patch)
tree773fac92c41b711df29bab825517d935e55e28f2
parent8c4a7e17acaf44e9f917e7a0365bad3fac67c778 (diff)
parentae0f6c611d0d195da243e4a8f7dfe5fcb79978ac (diff)
Make nova.virt.images fetch images from a Glance URL when Glance is used as the image service (rather than unconditionally fetch them from an S3/objectstore URL).
-rw-r--r--nova/virt/images.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/virt/images.py b/nova/virt/images.py
index 9c987e14d..7a6fef330 100644
--- a/nova/virt/images.py
+++ b/nova/virt/images.py
@@ -111,5 +111,8 @@ def _image_path(path):
def image_url(image):
+ if FLAGS.image_service == "nova.image.glance.GlanceImageService":
+ return "http://%s:%s/images/%s" % (FLAGS.glance_host,
+ FLAGS.glance_port, image)
return "http://%s:%s/_images/%s/image" % (FLAGS.s3_host, FLAGS.s3_port,
image)