nova/nova/tests/unit/api
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
..
openstack Convert features not supported error to HTTPBadRequest 2021-09-01 09:09:58 -05:00
validation objects: Add 'socket' PCI NUMA affinity 2021-02-24 10:23:33 +00:00
__init__.py
test_auth.py Deprecate [api]auth_strategy and noauth2 2019-10-09 15:16:07 -05:00
test_compute_req_id.py Migrate to oslo request_id middleware - mv 2.46 2017-05-27 10:11:44 +00:00
test_wsgi.py Support sys.argv in wsgi app 2020-11-25 12:22:41 +01:00