]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix a regression in a recent IPAM change
authorYAMAMOTO Takashi <yamamoto@midokura.com>
Wed, 15 Jul 2015 03:48:38 +0000 (12:48 +0900)
committerYAMAMOTO Takashi <yamamoto@midokura.com>
Wed, 15 Jul 2015 03:57:24 +0000 (12:57 +0900)
The change I81806a43ecc6f0a7b293ce3e70d09d1e266b9f02
effectively removed _delete_port from NeutronDbPluginV2.
Unfortunately, it's still used directly by l3_dvr_db.

Closes-Bug: #1474639
Change-Id: I6ffb1d2d6f072ac1669637943eacad182244ca5c

neutron/db/l3_dvr_db.py
neutron/tests/unit/db/test_l3_dvr_db.py

index 95c82f1a8ab240769e5c85c72d6ec5accedf2931..27ba09ea13be36458714b9cdf6da2314e5c29605 100644 (file)
@@ -528,7 +528,7 @@ class L3_NAT_with_dvr_db_mixin(l3_db.L3_NAT_db_mixin,
                                             filters=device_filter)
         for p in ports:
             if self._get_vm_port_hostid(context, p['id'], p) == host_id:
-                self._core_plugin._delete_port(context, p['id'])
+                self._core_plugin.ipam.delete_port(context, p['id'])
                 return
 
     def create_fip_agent_gw_port_if_not_exists(
index 3a3335784e1637d56f167144fbc5e6f5ea6c38d8..c7bce75da4a589edb20ce148f2d0b16280884049 100644 (file)
@@ -263,7 +263,7 @@ class L3DvrTestCase(testlib_api.SqlTestCase):
         plugin.get_ports.assert_called_with(self.ctx, filters={
             'network_id': ['network_id'],
             'device_owner': [l3_const.DEVICE_OWNER_AGENT_GW]})
-        plugin._delete_port.assert_called_with(self.ctx, 'my_port_id')
+        plugin.ipam.delete_port.assert_called_with(self.ctx, 'my_port_id')
 
     def _delete_floatingip_test_setup(self, floatingip):
         fip_id = floatingip['id']