summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/common.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/nova/api/openstack/common.py b/nova/api/openstack/common.py
index 3b93d961e..01d620aed 100644
--- a/nova/api/openstack/common.py
+++ b/nova/api/openstack/common.py
@@ -38,11 +38,6 @@ def limited(items, req):
return items[offset:range_end]
-def get_image_id_or_id(image):
- """Some image services return image_id, others id"""
- return image.get('imageId', image.get('id', None))
-
-
def get_image_id_from_image_hash(image_service, context, image_hash):
"""Given an Image ID Hash, return an objectstore Image ID.
@@ -59,7 +54,6 @@ def get_image_id_from_image_hash(image_service, context, image_hash):
except NotImplementedError:
items = image_service.index(context)
for image in items:
- image_id = get_image_id_or_id(image)
- if abs(hash(image_id)) == int(image_hash):
+ if abs(hash(image['id'])) == int(image_hash):
return image_id
raise exception.NotFound(image_hash)