nova/nova/tests/unit/api
Qin Zhao 5b4bd2aa16 Refine HTTP error code for os-interface
When attaching interface to an instance, Neutron may return several types of
errors. Nova need to translate those errors into appropriate HTTP error codes,
so that end user will be able to know the exact failure reason. Propose to
change the following mappings:

PortNotFound - 400 --> 404
PortInUse  - 400 --> 409
NetworkNotFound - 400 --> 404
FixedIpAlreadyInUse - 400 --> 409

In order to keep V2 api backward-compatibility, only propose to adjust the
error code of V2.1/V3 api.

Change-Id: Icc80c1f847bb9c5737e7282ce8543be52cde8f89
Closes-Bug: 1380901
2014-11-14 17:12:14 +08:00
..
ec2 move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
openstack Refine HTTP error code for os-interface 2014-11-14 17:12:14 +08:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
test_auth.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
test_compute_req_id.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
test_validator.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
test_wsgi.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00