Don't do glance v2 calls when config is set to v1
Fixes bug 1252549 Change-Id: I6d9509bfecd2f73040a0ad27aff8fc5f6fd0a899
This commit is contained in:
parent
1099f09a2d
commit
a5424f700e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue