]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Prevent update alloc pool over existing gateway ip
authorJohn Kasperski <jckasper@us.ibm.com>
Thu, 30 Jul 2015 04:52:01 +0000 (23:52 -0500)
committerJohn Kasperski <jckasper@us.ibm.com>
Thu, 30 Jul 2015 04:59:56 +0000 (23:59 -0500)
commit2e733a9c9e0166e52c4a052662a39a8ca825d112
treee8a9ec28e1ea32656ef8b0a0bdcdb7a5756a55be
parent50d662d95a03fa7986c0ddadb386cad12590c0ab
Prevent update alloc pool over existing gateway ip

The gateway IP for a subnet is not allowed to be listed in the
allocation pool for that subnet. This restriction is checked and
enforced at subnet-create time.

During subnet-update, it is only partially checked. An
exception is returned if the update request tries to place the gateway
IP in an existing allocation pool OR if both gateway and allocation
pool are being changed and the gateway is located in the new pool.

If only the allocation pool is being updated, no check is made to
verify that the new allocation pool does not contain the existing
gateway IP.

Closes-Bug: #1479514
Change-Id: Id9583d6ad88188955388931cd688ca19bd2c9717
neutron/db/db_base_plugin_v2.py
neutron/tests/unit/db/test_db_base_plugin_v2.py