diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-03-23 20:27:34 +0000 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-03-23 21:53:27 +0000 |
| commit | aa29a67d5cecfa320f98fa9989bf0b9179240016 (patch) | |
| tree | 645a95015d32f18baa794c3748c66335a8c6218a /nova/api | |
| parent | 81ac4e729c0ca9e8fdb8064db30ae05eb8ce74a7 (diff) | |
makes volume versions display properly
* The compute versions controller changed during a refactor and broke
the volume versions controller (since we are using it as a base class)
* Added naive test
* fixes bug 963357
Change-Id: Ica9c65952b800d316d264db11f89e369e56bcade
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/volume/versions.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/nova/api/openstack/volume/versions.py b/nova/api/openstack/volume/versions.py index f1c39a59c..68d34b1f9 100644 --- a/nova/api/openstack/volume/versions.py +++ b/nova/api/openstack/volume/versions.py @@ -56,15 +56,19 @@ VERSIONS = { class Versions(versions.Versions): - def dispatch(self, request, *args): - """Respond to a request for all OpenStack API versions.""" - builder = views_versions.get_view_builder(request) - if request.path == '/': - # List Versions - return builder.build_versions(VERSIONS) - else: - # Versions Multiple Choice - return builder.build_choices(VERSIONS, request) + @wsgi.serializers(xml=versions.VersionsTemplate, + atom=versions.VersionsAtomSerializer) + def index(self, req): + """Return all versions.""" + builder = views_versions.get_view_builder(req) + return builder.build_versions(VERSIONS) + + @wsgi.serializers(xml=versions.ChoicesTemplate) + @wsgi.response(300) + def multi(self, req): + """Return multiple choices.""" + builder = views_versions.get_view_builder(req) + return builder.build_choices(VERSIONS, req) class VolumeVersionV1(object): |
