]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Cleanup rename of get_compute_ports_on_host_by_subnet
authorCarl Baldwin <carl.baldwin@hp.com>
Tue, 2 Sep 2014 16:49:45 +0000 (16:49 +0000)
committerCarl Baldwin <carl.baldwin@hp.com>
Wed, 3 Sep 2014 18:02:09 +0000 (18:02 +0000)
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

neutron/db/l3_dvrscheduler_db.py
neutron/tests/unit/test_l3_schedulers.py

index 9c632b4ec6a075ba67a9c0f685980b7c8a54cb94..e0e0f6da9238b9649ad03b7de684787da8056f8d 100644 (file)
@@ -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 '
index 14ef8327d14025ba5af9079a80ee9e9ee3b37e66..15e48fc68bdac8a4f807badea08caa4bb5901528 100644 (file)
@@ -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()