]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Delete subnet fails if assoc port has IPs from another subnet
authorDane LeBlanc <leblancd@cisco.com>
Wed, 19 Feb 2014 20:53:18 +0000 (15:53 -0500)
committerDane LeBlanc <leblancd@cisco.com>
Mon, 3 Mar 2014 17:41:43 +0000 (12:41 -0500)
commitf50df8eb3c5bf38abbb0389b85c4b628cffb59f4
treea58b40e265121f2061f155595256adef830fc99d
parent7fb2d579ae5d14fdb538b6f7fde6f58b533c82ba
Delete subnet fails if assoc port has IPs from another subnet

This change fixes the following failure scenario:
- Create a network
- Create two subnets on the network
- Create a port on the network using one of the subnets
- Delete the other subnet
= = = > FAILURE: Subnet delete fails because supposedly there
is/are port(s) still associated with that subnet.

The problem addressed is that delete_subnet() in
neutron/db/db_base_plugin.py is checking for port(s) still being
associated with the subnet's network, not the subnet itself.

Change-Id: I7adbe18cce412135b2e42dcb7c592e60c1ec5f8f
Closes-Bug: #1281694
neutron/db/db_base_plugin_v2.py
neutron/tests/unit/test_db_plugin.py