]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
prevent invalid deletion of ports using by L3 devices
authorDan Wendlandt <dan@nicira.com>
Fri, 31 Aug 2012 11:29:12 +0000 (04:29 -0700)
committerDan Wendlandt <dan@nicira.com>
Fri, 31 Aug 2012 11:29:12 +0000 (04:29 -0700)
commit8fb4e6efe8dcf1987d41917f71da8db345647321
tree424554d54944c59dc2e262aeea05a5956a30b997
parent4c9f9fe4525568d50d9bc5c7fc7897d5ed5ff463
prevent invalid deletion of ports using by L3 devices

bug 1039947

The bug noticed that an admin user could delete a port that stored
the underlying IP allocation for a floating IP.  This patch prevents
the direction deletion of ports via the API for ports that are used as
router interfaces, router gateways, of for floating IPs.

Add a unit test to check such an invalid delete, and also updates
unit tests to avoid them tripping over the new checks.

Change-Id: Ief28e3181583428d55259275a7c21151a4a4fa9b
quantum/db/l3_db.py
quantum/extensions/l3.py
quantum/plugins/linuxbridge/lb_quantum_plugin.py
quantum/plugins/openvswitch/ovs_quantum_plugin.py
quantum/tests/unit/test_db_plugin.py
quantum/tests/unit/test_l3_plugin.py