'Reschedule router to (a) new l3 agent(s)
Remove the router from the agent(s) currently hosting it and
schedule it again'

def reschedule_router(self, context, router_id, candidates=None):

    cur_agents = self.list_l3_agents_hosting_router(context, router_id)['agents']
    with context.session.begin(subtransactions=True):
        cur_agents_ids = [agent['id'] for agent in cur_agents]
        self._unschedule_router(context, router_id, cur_agents_ids)
        self.schedule_router(context, router_id, candidates=candidates)
        new_agents = self.list_l3_agents_hosting_router(context, router_id)['agents']
        if (not new_agents):
            raise l3agentscheduler.RouterReschedulingFailed(router_id=router_id)
    self._notify_agents_router_rescheduled(context, router_id, cur_agents, new_agents)
