summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorMauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>2012-08-31 13:03:16 -0400
committerMauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>2012-09-03 08:17:44 -0400
commitb957a3553e9274043e6ad55a92ceb91c22ca2265 (patch)
tree9eadbfd289233186f0e3495eef8925f8da6c8b02 /nova/api
parent7ba2075e0756afcd1357beb09de4aaba5fd12d24 (diff)
Add API samples to images api
Fixes issue with updated metata not being returned properly from the api. Adds a small check to the samples baseclass to allow the output to be generated even if the template file is empty. Change-Id: Idcdd24d7e785026e50b9abf4762466fd55a8d42f
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/image_metadata.py2
-rw-r--r--nova/api/openstack/compute/views/images.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/nova/api/openstack/compute/image_metadata.py b/nova/api/openstack/compute/image_metadata.py
index 516b25d88..4273e40cd 100644
--- a/nova/api/openstack/compute/image_metadata.py
+++ b/nova/api/openstack/compute/image_metadata.py
@@ -66,7 +66,7 @@ class Controller(object):
image['properties'][key] = value
common.check_img_metadata_properties_quota(context,
image['properties'])
- self.image_service.update(context, image_id, image, None)
+ image = self.image_service.update(context, image_id, image, None)
return dict(metadata=image['properties'])
@wsgi.serializers(xml=common.MetaItemTemplate)
diff --git a/nova/api/openstack/compute/views/images.py b/nova/api/openstack/compute/views/images.py
index 5d16ac1de..c0ea71385 100644
--- a/nova/api/openstack/compute/views/images.py
+++ b/nova/api/openstack/compute/views/images.py
@@ -120,7 +120,7 @@ class ViewBuilder(common.ViewBuilder):
}]
def _get_alternate_link(self, request, identifier):
- """Create an alternate link for a specific flavor id."""
+ """Create an alternate link for a specific image id."""
glance_url = utils.generate_glance_url()
glance_url = self._update_link_prefix(glance_url,
FLAGS.osapi_glance_link_prefix)