nova/nova/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 conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
api_version_request.py api: Introduce microversion 2.89 adjusting os-volume_attachments 2021-08-24 12:07:41 +01:00
auth.py Noauth should also use request_id from compute_req_id.py 2018-04-04 14:21:01 -04:00
common.py Remove six.text_type (1/2) 2020-12-13 11:25:31 +00:00
identity.py Adapter raise_exc=False by default 2018-06-22 09:40:33 -05:00
requestlog.py api: Log correct client IP if load balancer in use 2021-06-09 22:20:38 +00:00
urlmap.py Remove six.PY2 and six.PY3 2020-08-15 07:45:23 +00:00
versioned_method.py Implement microversion support on api methods 2014-12-05 09:54:41 +08:00
wsgi.py Convert features not supported error to HTTPBadRequest 2021-09-01 09:09:58 -05:00
wsgi_app.py Initialize global data separately and run_once in WSGI app init 2020-12-14 20:38:37 +00:00