def _schedule_ha_routers_to_additional_agent(self, plugin, context, agent):

        routers_agents = self.get_ha_routers_l3_agents_counts(context, plugin,
                                                              agent)
        scheduled = False
        admin_ctx = context.elevated()
        for router, agents in routers_agents:
            max_agents_not_reached = (
                not self.max_ha_agents or agents < self.max_ha_agents)
            if max_agents_not_reached:
                if not self._router_has_binding(admin_ctx, router['id'],
                                                agent.id):
                    self.create_ha_port_and_bind(plugin, admin_ctx,
                                                 router['id'],
                                                 router['tenant_id'],
                                                 agent)
                    scheduled = True

        return scheduled
Provides the actual filtering logic.
dataset/ETHPy150Open openstack/neutron/neutron/scheduler/l3_agent_scheduler.py/L3Scheduler._schedule_ha_routers_to_additional_agent--crossover with--dataset/ETHPy150Open openstack/horizon/horizon/tables/actions.py/FilterAction.filter