'Return L3 agents where a router could be scheduled.'

def _get_candidates(self, plugin, context, sync_router):

    is_ha = sync_router.get('ha', False)
    with context.session.begin(subtransactions=True):
        current_l3_agents = plugin.get_l3_agents_hosting_routers(context, [sync_router['id']], admin_state_up=True)
        if (current_l3_agents and (not is_ha)):
            LOG.debug('Router    %(router_id)s    has    already    been    hosted    by    L3    agent    %(agent_id)s', {'router_id': sync_router['id'], 'agent_id': current_l3_agents[0]['id']})
            return []
        active_l3_agents = plugin.get_l3_agents(context, active=True)
        if (not active_l3_agents):
            LOG.warning(_LW('No    active    L3    agents'))
            return []
        candidates = plugin.get_l3_agent_candidates(context, sync_router, active_l3_agents)
        if (not candidates):
            LOG.warning(_LW('No    L3    agents    can    host    the    router    %s'), sync_router['id'])
        return candidates
