From fa690cfc90a84e8e948621a94557dcf6f09f2678 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 15 Jul 2015 12:48:38 +0900 Subject: [PATCH] Fix a regression in a recent IPAM change 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 | 2 +- neutron/tests/unit/db/test_l3_dvr_db.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/neutron/db/l3_dvr_db.py b/neutron/db/l3_dvr_db.py index 95c82f1a8..27ba09ea1 100644 --- a/neutron/db/l3_dvr_db.py +++ b/neutron/db/l3_dvr_db.py @@ -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( diff --git a/neutron/tests/unit/db/test_l3_dvr_db.py b/neutron/tests/unit/db/test_l3_dvr_db.py index 3a3335784..c7bce75da 100644 --- a/neutron/tests/unit/db/test_l3_dvr_db.py +++ b/neutron/tests/unit/db/test_l3_dvr_db.py @@ -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'] -- 2.45.2