]> 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)
committerMark McClain <mmcclain@yahoo-inc.com>
Fri, 4 Apr 2014 22:36:18 +0000 (18:36 -0400)
commitd56f12d4676c1cc26d0da80e053da07e0253dbe8
tree95ac29aac0bb764a07d9679ff6954cd11a566a8d
parentac2718c4aa7b6eb0c0e82df93cf59d890432d652
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
(cherry picked from commit 13c9f3b813f5bb368e311ba0d428fa759d68289a)
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