diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-07-15 19:46:03 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-07-15 19:46:03 +0000 |
| commit | 48b28b04be3b2f7a4aa5f124b66f1e1f669cb546 (patch) | |
| tree | 182525bd6de88f2e5d83b9f816b90df76aabd914 /nova/api | |
| parent | 3a11738f517999ed1fd3a2c0a7ca452c7191b50f (diff) | |
| parent | 1539866314393e8565eef05f1f63dba9ffa69de3 (diff) | |
| download | nova-48b28b04be3b2f7a4aa5f124b66f1e1f669cb546.tar.gz nova-48b28b04be3b2f7a4aa5f124b66f1e1f669cb546.tar.xz nova-48b28b04be3b2f7a4aa5f124b66f1e1f669cb546.zip | |
Ensures a bookmark link is returned in GET /images. Before, it was only returned in GET /images/detail
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/views/images.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/nova/api/openstack/views/images.py b/nova/api/openstack/views/images.py index 5c0510377..873ce212a 100644 --- a/nova/api/openstack/views/images.py +++ b/nova/api/openstack/views/images.py @@ -121,16 +121,20 @@ class ViewBuilderV11(ViewBuilder): href = self.generate_href(image_obj["id"]) bookmark = self.generate_bookmark(image_obj["id"]) - image["links"] = [{ - "rel": "self", - "href": href, - }] + image["links"] = [ + { + "rel": "self", + "href": href, + }, + { + "rel": "bookmark", + "href": bookmark, + }, + + ] if detail: image["metadata"] = image_obj.get("properties", {}) - image["links"].append({"rel": "bookmark", - "href": bookmark, - }) return image |
