]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Make prevent_l3_port_deletion handle missing port
authorKevin Benton <blak111@gmail.com>
Fri, 30 Jan 2015 20:53:57 +0000 (12:53 -0800)
committerKevin Benton <blak111@gmail.com>
Mon, 2 Feb 2015 22:07:01 +0000 (14:07 -0800)
commit4f5b01c18b66e9f456150ceed08e8f0264499d7e
treee44df7eb5d7c1cc8ea805b58ce41377e4ea6fed0
parent88d6d61586ec5b8ef0334c83dd9d5f51676921c9
Make prevent_l3_port_deletion handle missing port

This adjusts the prevent_l3_port_deletion function to handle
the case where the port ID that is passed to it does not have
an entry in the database.

Previously it was raising an exception in this case, which is
inconsistent to how ML2 was handling concurrent port_delete requests
further in the port delete function (log them but don't fail).

Closes-Bug: #1416554
Change-Id: I6da021bdf0c79f72336416d02ab989407f352904
neutron/db/l3_db.py
neutron/plugins/ml2/plugin.py
neutron/tests/unit/test_l3_plugin.py