summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorjaypipes@gmail.com <>2010-10-20 02:54:21 +0000
committerTarmac <>2010-10-20 02:54:21 +0000
commit69cacadad39f1b5f52da41b3cdaa3d6b0c88a3ab (patch)
tree67222147b2c5b8cbb303acf1fc0fec7ed1fd7b1d /nova/api
parent9145feeed99b02a2798fde909a2abe8d900b522c (diff)
parent9335784f8230df1ead63839b4ddd5dd12f665c7b (diff)
* Fills out the Parallax/Glance API calls for update/create/delete and adds unit tests for them.
* Modifies the ImageController and GlanceImageService/LocalImageService calls to use index and detail routes to comply perfectly with the RS/OpenStack API.
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/images.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/nova/api/openstack/images.py b/nova/api/openstack/images.py
index aa438739c..5ccf659f7 100644
--- a/nova/api/openstack/images.py
+++ b/nova/api/openstack/images.py
@@ -48,9 +48,15 @@ class Controller(wsgi.Controller):
def detail(self, req):
"""Return all public images in detail."""
- data = self._service.index()
- data = nova.api.openstack.limited(data, req)
- return dict(images=data)
+ try:
+ images = self._service.detail()
+ images = nova.api.openstack.limited(images, req)
+ except NotImplementedError:
+ # Emulate detail() using repeated calls to show()
+ images = self._service.index()
+ images = nova.api.openstack.limited(images, req)
+ images = [self._service.show(i['id']) for i in images]
+ return dict(images=images)
def show(self, req, id):
"""Return data about the given image id."""