From a5424f700e6cce409763019906acfe293a75ed1a Mon Sep 17 00:00:00 2001 From: Sam Morrison Date: Tue, 19 Nov 2013 15:20:05 +1100 Subject: [PATCH] Don't do glance v2 calls when config is set to v1 Fixes bug 1252549 Change-Id: I6d9509bfecd2f73040a0ad27aff8fc5f6fd0a899 --- cinder/image/glance.py | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.45.2