]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
L3 port delete prevention: do not raise if no IP on port
authorSalvatore Orlando <salv.orlando@gmail.com>
Mon, 4 Mar 2013 17:19:47 +0000 (18:19 +0100)
committerSalvatore Orlando <salv.orlando@gmail.com>
Mon, 4 Mar 2013 22:02:07 +0000 (23:02 +0100)
commit921f203f4906a3b566f5a58471a55a4eedfc939c
treeac50d614c3dde2dea355018fcf0a3916a3a66618
parentccb847e1fba2f08d5e445251eee2623fd168ffd0
L3 port delete prevention: do not raise if no IP on port

Bug #1104337

This patch alters the prevent_l3_port_deletion logic.
PortInUse is raised only if the port has a device owner in
(router_interface, router_gateway, floatingip) and an IP
address.
If no IP address is found on the port the port itself can
be considered stale and therefore deleted as any association
with l3 entities would be void.

Change-Id: I9d711b2a9d2cbcc8be481f1751f51fe5b9f01327
quantum/db/l3_db.py
quantum/tests/unit/test_l3_plugin.py