From: Carl Baldwin Date: Tue, 2 Sep 2014 16:49:45 +0000 (+0000) Subject: Cleanup rename of get_compute_ports_on_host_by_subnet X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=50d2b253ac00b562c416fd1ad52aefc7ef481525;p=openstack-build%2Fneutron-build.git Cleanup rename of get_compute_ports_on_host_by_subnet A recent merge [1] renamed this method to remove "compute_" from the name. Unfortunately, the rename was not done thoroughly. This patch cleans that up. No bug is referenced since this is an obvious ommission in a recent patch. [1] https://review.openstack.org/#/c/114141/ Change-Id: I8320bc8deb6dcda586ccff01120270b3ce257ea2 --- diff --git a/neutron/db/l3_dvrscheduler_db.py b/neutron/db/l3_dvrscheduler_db.py index 9c632b4ec..e0e0f6da9 100644 --- a/neutron/db/l3_dvrscheduler_db.py +++ b/neutron/db/l3_dvrscheduler_db.py @@ -254,12 +254,12 @@ class L3_DVRsch_db_mixin(l3agent_sch_db.L3AgentSchedulerDbMixin): subnet_ids = self.get_subnet_ids_on_router(context, router_id) for subnet in subnet_ids: vm_ports = ( - self._core_plugin.get_compute_ports_on_host_by_subnet( + self._core_plugin.get_ports_on_host_by_subnet( context, host, subnet)) if vm_ports: - LOG.debug('VM exists on the snat enabled l3_agent ' - 'host %(host)s and router_id %(router_id)s', - {'host': host, 'router_id': router_id}) + LOG.debug('One or more ports exist on the snat enabled ' + 'l3_agent host %(host)s and router_id %(id)s', + {'host': host, 'id': router_id}) break agent_id = binding.l3_agent_id LOG.debug('Delete binding of the SNAT router %(router_id)s ' diff --git a/neutron/tests/unit/test_l3_schedulers.py b/neutron/tests/unit/test_l3_schedulers.py index 14ef8327d..15e48fc68 100644 --- a/neutron/tests/unit/test_l3_schedulers.py +++ b/neutron/tests/unit/test_l3_schedulers.py @@ -712,7 +712,7 @@ class L3DvrSchedulerTestCase(testlib_api.SqlTestCase, router_id = 'foo_router_id' core_plugin = mock.PropertyMock() type(self.dut)._core_plugin = core_plugin - (self.dut._core_plugin.get_compute_ports_on_host_by_subnet. + (self.dut._core_plugin.get_ports_on_host_by_subnet. return_value) = [] core_plugin.reset_mock() l3_notifier = mock.PropertyMock()