]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add Pluggable IPAM Backend Part 1
authorPavel Bondar <pbondar@infoblox.com>
Mon, 6 Jul 2015 15:36:22 +0000 (18:36 +0300)
committerPavel Bondar <pbondar@infoblox.com>
Fri, 10 Jul 2015 14:11:59 +0000 (17:11 +0300)
commit45f3bb810fcdded68fdb40645025fc5aee0aba72
treebcf3361df67a524dc7f37a11744b5bfcb11ddb6a
parent310e1e05537f0ba0dd66fe3ffdda3837e90d1a8d
Add Pluggable IPAM Backend Part 1

Add methods for allocating/deallocating ips using IPAM driver.
Methods are covered by unit tests and currently used only by them.

For pluggable IPAM case ipam driver may execute calls to third-party servers.
It means we can't rely on database transaction rollback in case of failure.
So if any bulk ip allocation/deallocation fails rollback should be done
on third-party servers as well.
Any completed ip allocation should be explicitly deallocated in case of
failure, and vise versa for failure on deallocation.
Try-except block is used to do manual rollback actions.
After rollback actions are done, exception is reraised and local db
transaction rollback occurs.

Pluggable IPAM was divided into two parts to keep review size small.
Following patches are expected to use these methods for ip address
allocation.

Partially-Implements: blueprint neutron-ipam

Change-Id: I8bb836c9883e189b065698ae0a862b2d909d5cbf
neutron/db/ipam_pluggable_backend.py [new file with mode: 0644]
neutron/ipam/requests.py
neutron/tests/unit/db/test_ipam_pluggable_backend.py [new file with mode: 0644]
neutron/tests/unit/ipam/test_requests.py