]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
ML2 plugin should not delete ports on subnet deletion
authorOleg Bondarev <obondarev@mirantis.com>
Fri, 1 Nov 2013 11:20:27 +0000 (15:20 +0400)
committerOleg Bondarev <obondarev@mirantis.com>
Fri, 22 Nov 2013 06:41:03 +0000 (10:41 +0400)
commit0d131ff0e9964cb6a65f64809270f9d597c2d5d1
tree31eca038106407214f69cf6f499be7619e804e8a
parent67fa30ff8fb0d8662465336c535a36ad116e4289
ML2 plugin should not delete ports on subnet deletion

On subnet deletion ports are deleted asynchronously by dhcp agent
so plugin doesn't need to delete them itself.
Instead Ml2Plugin.delete_subnet() method should call update_port()
for each allocation to remove the IP from the port and call the MechanismDrivers.
The patch also adds subnets test suite from test_db_plugin to test_ml2_plugin.

Closes-Bug: #1246737
Change-Id: I7cf0461e9a3cfec4921e2de41fb1ab3fc119fddc
neutron/plugins/ml2/plugin.py
neutron/tests/unit/ml2/test_ml2_plugin.py
neutron/tests/unit/test_db_plugin.py