From: Sam Morrison Date: Tue, 19 Nov 2013 04:20:05 +0000 (+1100) Subject: Don't do glance v2 calls when config is set to v1 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a5424f700e6cce409763019906acfe293a75ed1a;p=openstack-build%2Fcinder-build.git Don't do glance v2 calls when config is set to v1 Fixes bug 1252549 Change-Id: I6d9509bfecd2f73040a0ad27aff8fc5f6fd0a899 --- diff --git a/cinder/image/glance.py b/cinder/image/glance.py index 84e9a6980..641c33793 100644 --- a/cinder/image/glance.py +++ b/cinder/image/glance.py @@ -233,6 +233,9 @@ class GlanceImageService(object): """Returns the direct url representing the backend storage location, or None if this attribute is not shown by Glance. """ + if CONF.glance_api_version == 1: + # image location not available in v1 + return (None, None) try: # direct_url is returned by v2 api client = GlanceClientWrapper(version=2)