]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add InvalidIpForNetwork and InvalidIpForSubnet exception
authorQin Zhao <chaochin@gmail.com>
Tue, 16 Sep 2014 07:17:44 +0000 (15:17 +0800)
committerQin Zhao <chaochin@gmail.com>
Mon, 2 Mar 2015 07:18:58 +0000 (15:18 +0800)
commitcbb15084912151ea39ec3817f047dcf3e6b7c820
tree534ac72f83f9631134bf9b74dfbb282cfa3a1170
parent51edb269501a322ac18d2cacfdf61a64a0f2c6a8
Add InvalidIpForNetwork and InvalidIpForSubnet exception

When posting an 'attach interface' request to Nova with an invalid
ip for defined network, Nova returns an HTTP 500 error. In fact,
Neutron returns 'InvalidInput' error, but Neutron client is not able
to translate this error to a specific exception. So that a general
'BadRequest' exception is thrown. Neutron client and Nova need a more
specific Neutron error type, in order to address and translate the
error in to a proper Nova exception.

APIImpact

Change-Id: Id4d3108234a198c0eb75237ea8991a72bd3cc4bb
Partial-Bug: 1369871
neutron/common/exceptions.py
neutron/db/db_base_plugin_v2.py
neutron/tests/unit/opencontrail/test_contrail_plugin.py
neutron/tests/unit/test_db_plugin.py