]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Make allocation_pools attribute of subnet updateable by PUT
authormarios <marios@redhat.com>
Fri, 13 Dec 2013 16:57:28 +0000 (18:57 +0200)
committermarios <marios@redhat.com>
Mon, 9 Jun 2014 16:40:37 +0000 (19:40 +0300)
commitc9077f6219584b9ace4a43806f69d23efea0d504
treed8044529c0b8f51cd933a19859b42747378617f5
parent2bebeec6c93f196720c3368f29e09a77546a646b
Make allocation_pools attribute of subnet updateable by PUT

Bug 1111572 was filed about a failed update (PUT) on
'allocation_pools' of subnet. This is currently not allowed by the
neutron API (hence DocImpact below). Following discussion on the
bug and subsequently, it seems this is a desirable feature.

This review makes the allocation_pools attribute of subnet
updateable by PUT. The semantics are that the entire allocation
pools attribute is replaced by the provided parameter (see
provided tests for details).

Unit tests added that exercise successful update of
allocation_pools with sane params and update using erroneous
allocation_pools that fall outside the subnet cidr.

DocImpact

Closes-Bug: 1111572
Change-Id: I47a3a71d0d196b76eda46b1d960193fb60417ba9
Co-Authored-By: Robert Collins <rbtcollins@hp.com>
neutron/api/v2/attributes.py
neutron/db/db_base_plugin_v2.py
neutron/db/models_v2.py
neutron/tests/unit/plumgrid/test_plumgrid_plugin.py
neutron/tests/unit/test_db_plugin.py