]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add check for subnet update with conflict gateway and allocation_pools
authormathieu-rohon <mathieu.rohon@gmail.com>
Thu, 7 Feb 2013 15:05:22 +0000 (16:05 +0100)
committermathieu-rohon <mathieu.rohon@gmail.com>
Wed, 13 Feb 2013 13:39:45 +0000 (14:39 +0100)
commit41b6ac4b1b02ce5390f0eac72771f3333a0c5dff
tree7ee911084944e6bf0c204a0b61e73005bb803f16
parenta2ea5ee7e62ac39dcc8af53f4e0ce48f5d99e7ff
Add check for subnet update with conflict gateway and allocation_pools

Fixes: bug 1062061
The patch will raise exception 'GatewayConflictWithAllocationPools' when
subnet update with conflict gateway and allocation_pools.

Because before validate gateway ip with conflict allocation pools, we need
validate allocation pools first. Move the validation of allocation pools
into _validate_subnet. Then_allocate_pools_for_subnet is only responsible
for pools allocation, and_validate_subnet is responsible for most validate
for subnet.

Change-Id: I8dffe45ce5c02e8e6c317bad470054564538bcf2
quantum/common/exceptions.py
quantum/db/db_base_plugin_v2.py
quantum/tests/unit/test_db_plugin.py