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 '
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()