summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorJustin Santa Barbara <justin@fathomdb.com>2011-02-18 17:17:51 -0800
committerJustin Santa Barbara <justin@fathomdb.com>2011-02-18 17:17:51 -0800
commit8684eb3aa638883ea82bbaf8eb59076f1d7e6a05 (patch)
tree63fbd9ca14169820ef95ad8be133b1ff350586eb /nova
parent5dfa5ce7d1374509fea51f8d0b132ea865f34dc6 (diff)
downloadnova-8684eb3aa638883ea82bbaf8eb59076f1d7e6a05.tar.gz
nova-8684eb3aa638883ea82bbaf8eb59076f1d7e6a05.tar.xz
nova-8684eb3aa638883ea82bbaf8eb59076f1d7e6a05.zip
ObjectStore doesn't use properties collection; kernel_id and ramdisk_id aren't required anyway
Diffstat (limited to 'nova')
-rw-r--r--nova/api/openstack/servers.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index 486eca508..11a84687d 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -144,13 +144,11 @@ class Controller(wsgi.Controller):
metadata stored in Glance as 'image_properties'
"""
def lookup(param):
- _image_id = image_id
- try:
- return image['properties'][param]
- except KeyError:
- raise exception.NotFound(
- _("%(param)s property not found for image %(_image_id)s") %
- locals())
+ properties = image.get('properties')
+ if properties:
+ return properties.get(param)
+ else:
+ return image.get(param)
image_id = str(image_id)
image = self._image_service.show(req.environ['nova.context'], image_id)