]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix auto-deletion of ports and subnets in ML2
authorBob Kukura <rkukura@redhat.com>
Fri, 27 Sep 2013 21:54:45 +0000 (17:54 -0400)
committerBob Kukura <rkukura@redhat.com>
Fri, 27 Sep 2013 22:49:07 +0000 (18:49 -0400)
commit19804bb5c5ad8ba10fbda1bf213f698d97c137e7
tree78f2171a1865077c662c7bed2d7189176717f31e
parent4f14217300f61a4accbaf4b8f5ccb5f1cd1dad35
Fix auto-deletion of ports and subnets in ML2

When a network is deleted, certain ports and any subnets referencing
it are auto-deleted. The implementation of
NeutronDBPluginV2.delete_network() does this at the DB level, so ML2's
mechanism drivers were not being called.

Ml2Plugin.delete_network() is changed to not use the base class's
method, and to auto-delete ports and subnets by calling its own
delete_port() and delete_subnet() methods outside of the
transaction. A loop avoids race conditions with ports or subnets being
asynchronously added to the network.

Closes-Bug: 1230330
Change-Id: Icf21400c9938eec29d70da8497b9ef92642131e2
neutron/plugins/ml2/plugin.py