]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix to throw correct error code for bad attribute
authorSudipta Biswas <sbiswas7@in.ibm.com>
Tue, 5 Aug 2014 14:10:06 +0000 (19:40 +0530)
committerSudipta Biswas <sbiswas7@in.ibm.com>
Fri, 8 Aug 2014 05:00:23 +0000 (10:30 +0530)
commit6b8a5f0e1d26d2721e7ad7fc67099ff8b880d9ec
tree81604e15942fff5cafe6f3ebfac4283a9e22e151
parenta3022cfce055adb3e79c15650700dba6a02c94ee
Fix to throw correct error code for bad attribute

Currently the neutron network API throws up error code 500 for
the extended attribute for segmentation id. This can be reproduced
if the user types in a random string in place of an integer value
for the segmentation id. The proper behavior should throw an error
code 400 with the appropriate failure message. This patch fixes the
same issue and covers it with a test case.

Change-Id: I4735e20f5b8b23c5b2a9d896415c2e84561a279c
Closes-bug: #1348056
neutron/extensions/providernet.py
neutron/tests/unit/test_extension_pnet.py