]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
NSX: fix validation logic on network gateway connect
authorSalvatore Orlando <salv.orlando@gmail.com>
Thu, 10 Jul 2014 21:55:04 +0000 (14:55 -0700)
committerSalvatore Orlando <salv.orlando@gmail.com>
Fri, 18 Jul 2014 14:12:52 +0000 (07:12 -0700)
commitff1ce62a0b9f504fd1dd46fb569ab85f5b56e4ff
tree9214fea2a233d1b103e9097ba502c1ed8b40016b
parent1cf3b80549821ed41ef51257a954ab9ce73c8f93
NSX: fix validation logic on network gateway connect

This patch adds validation for the segmentation ID when the
network type for the gateway connection is vlan.
This will avoid requests with invalid vlan IDs are sent to
the backend resulting in 500 error responses being
returned to API users.

To this aim this patch slightly alters the current validation
logic due to the fact that some checks are unnecessary since
the same routine sets default values which avoid the
conditions being checked.

Change-Id: If0e71f6fdf27a49f0eda727e21405cffbc260a7a
Closes-Bug: #1340431
neutron/plugins/vmware/dbexts/networkgw_db.py
neutron/tests/unit/vmware/extensions/test_networkgw.py