'Get the subset of routers that can be scheduled on the L3 agent.'

def _get_routers_can_schedule(self, plugin, context, routers, l3_agent):

    ids_to_discard = set()
    for router in routers:
        candidates = plugin.get_l3_agent_candidates(context, router, [l3_agent])
        if (not candidates):
            ids_to_discard.add(router['id'])
    return [r for r in routers if (r['id'] not in ids_to_discard)]
