diff --git a/nova/api/openstack/placement/handlers/root.py b/nova/api/openstack/placement/handlers/root.py index 6ec8b29d2..9b5b1bb94 100644 --- a/nova/api/openstack/placement/handlers/root.py +++ b/nova/api/openstack/placement/handlers/root.py @@ -13,13 +13,13 @@ from oslo_serialization import jsonutils from oslo_utils import encodeutils -import webob from nova.api.openstack.placement import microversion +from nova.api.openstack.placement import wsgi_wrapper -@webob.dec.wsgify +@wsgi_wrapper.PlacementWsgify def home(req): min_version = microversion.min_version_string() max_version = microversion.max_version_string() diff --git a/nova/tests/functional/api/openstack/placement/gabbits/microversion.yaml b/nova/tests/functional/api/openstack/placement/gabbits/microversion.yaml index d6002dd1f..72b12e298 100644 --- a/nova/tests/functional/api/openstack/placement/gabbits/microversion.yaml +++ b/nova/tests/functional/api/openstack/placement/gabbits/microversion.yaml @@ -36,6 +36,8 @@ tests: $.errors.[0].min_version: /^\d+\.\d+$/ response_strings: - "Unacceptable version header: 0.5" + response_json_paths: + $.errors[0].title: Not Acceptable - name: latest microversion is 1.4 GET: / @@ -63,6 +65,8 @@ tests: status: 400 response_strings: - "invalid version string: pony.horse" + response_json_paths: + $.errors[0].title: Bad Request - name: bad format multidot raises 400 GET: / @@ -71,6 +75,8 @@ tests: status: 400 response_strings: - "invalid version string: 1.2.3" + response_json_paths: + $.errors[0].title: Bad Request - name: error in application produces microversion headers desc: we do not want xml