]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
NSX plugin: return 400 for invalid gw certificate
authorSalvatore Orlando <salv.orlando@gmail.com>
Sat, 15 Mar 2014 00:43:42 +0000 (17:43 -0700)
committerSalvatore Orlando <salv.orlando@gmail.com>
Mon, 24 Mar 2014 08:46:29 +0000 (01:46 -0700)
commit13c9f3b813f5bb368e311ba0d428fa759d68289a
tree0eade37638e9bd6ea55fca121cec5f2dc2270517
parentec30b11fe5989fcca2b2d6bab780e7968c6ee130
NSX plugin: return 400 for invalid gw certificate

Gateway certificates are validated by the NSX backend.
The code currently treats a failure in certification
validation as a backend failure and therefore returns
a 500 status code.

This patch changes this behaviour by returning a 400
status code and an appropriate error description.
To this aim a handler for 400 errors has been added to
the NSX API client.

Closes-Bug: #1293508

Change-Id: I196f14337e47cd40710a6d8a30bbe1cac5ffe05b
neutron/plugins/vmware/api_client/exception.py
neutron/plugins/vmware/common/exceptions.py
neutron/plugins/vmware/nsxlib/l2gateway.py
neutron/plugins/vmware/plugins/base.py
neutron/tests/unit/vmware/extensions/test_networkgw.py