From f96dcc39c764f78c1a81cfc13e598f6acc033ddb Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Fri, 24 Feb 2012 12:54:34 -0800 Subject: Make sure detail view works for volume snaphots * adds tests for volume router * test uncovered bug in versions that now fixed * fixes bug 940616 Change-Id: I3f780d59d2fd60ebca3d142277a747400fe35336 --- nova/api/openstack/volume/__init__.py | 3 ++- nova/api/openstack/volume/versions.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'nova/api') diff --git a/nova/api/openstack/volume/__init__.py b/nova/api/openstack/volume/__init__.py index b4f72d8d5..f65fe8033 100644 --- a/nova/api/openstack/volume/__init__.py +++ b/nova/api/openstack/volume/__init__.py @@ -58,4 +58,5 @@ class APIRouter(nova.api.openstack.APIRouter): self.resources['snapshots'] = snapshots.create_resource() mapper.resource("snapshot", "snapshots", - controller=self.resources['snapshots']) + controller=self.resources['snapshots'], + collection={'detail': 'GET'}) diff --git a/nova/api/openstack/volume/versions.py b/nova/api/openstack/volume/versions.py index d4839ece4..f1c39a59c 100644 --- a/nova/api/openstack/volume/versions.py +++ b/nova/api/openstack/volume/versions.py @@ -22,8 +22,8 @@ from nova.api.openstack import wsgi VERSIONS = { - "v1": { - "id": "v1", + "v1.0": { + "id": "v1.0", "status": "CURRENT", "updated": "2012-01-04T11:33:21Z", "links": [ @@ -72,7 +72,7 @@ class VolumeVersionV1(object): atom=versions.VersionAtomSerializer) def show(self, req): builder = views_versions.get_view_builder(req) - return builder.build_version(VERSIONS['v2.0']) + return builder.build_version(VERSIONS['v1.0']) def create_resource(): -- cgit