'Add a l3 agent to host a router.'

def add_router_to_l3_agent(self, context, agent_id, router_id):

    if (not self.router_supports_scheduling(context, router_id)):
        raise l3agentscheduler.RouterDoesntSupportScheduling(router_id=router_id)
    with context.session.begin(subtransactions=True):
        router = self.get_router(context, router_id)
        agent = self._get_agent(context, agent_id)
        self.validate_agent_router_combination(context, agent, router)
        if (not self.check_agent_router_scheduling_needed(context, agent, router)):
            return
    self.create_router_to_agent_binding(context, agent, router)
    l3_notifier = self.agent_notifiers.get(constants.AGENT_TYPE_L3)
    if l3_notifier:
        l3_notifier.router_added_to_agent(context, [router_id], agent.host)
