nova/nova/tests/unit/api/openstack
Ghanshyam Mann 1b6a6e3916 Convert features not supported error to HTTPBadRequest
There is inconsistency on return code nova API return
for "Feature not supported/implemented'. Current return
code are 400, 409, and 403.
- 400 case: Example: Multiattach Swap Volume Not Supported
- 403 case: Cyborg integration
- 409 case: Example: Operation Not Supported For SEV ,
  Operation Not Supported For VTPM

In xena PTG, we agreed to fix this by returning 400 in all cases
- L446: https://etherpad.opendev.org/p/nova-xena-ptg

This commit convert all the features not supported error to
HTTPBadRequest(400).

To avoid converting every NotSupported inherited exception
in API controller to HTTPBadRequest generic conversion is
added in expected_errors() decorator.

Closes-Bug: #1938093

Change-Id: I410924668a73785f1bfe5c79827915d72e1d9e03
2021-09-01 09:09:58 -05:00
..
compute Convert features not supported error to HTTPBadRequest 2021-09-01 09:09:58 -05:00
__init__.py
common.py
fakes.py Transfer RequestLevelParams from ports to scheduling 2021-08-22 11:45:17 +02:00
test_api_version_request.py Replace 'fake' with a real project ID 2019-09-30 14:40:20 +09:00
test_auth.py Noauth should also use request_id from compute_req_id.py 2018-04-04 14:21:01 -04:00
test_common.py Remove six.text_type (2/2) 2020-12-13 11:26:35 +00:00
test_faults.py
test_legacy_v2_compatible_wrapper.py Trivial-Fix: Fix typos 2016-06-13 06:41:08 +00:00
test_mapper.py
test_requestlog.py api: Log correct client IP if load balancer in use 2021-06-09 22:20:38 +00:00
test_wsgi.py Remove six.iteritems/itervalues/iterkeys 2020-11-07 03:25:26 +00:00
test_wsgi_app.py db: Post reshuffle cleanup 2021-08-09 15:34:40 +01:00