def _get_unscheduled_routers(self, plugin, context):
if NEUTRON_VERSION.version[<NUM_LIT:0>] <= NEUTRON_NEWTON_VERSION.version[<NUM_LIT:0>]:<EOL><INDENT>context, plugin = plugin, context<EOL><DEDENT>no_agent_binding = ~sql.exists().where(<EOL>bc.Router.id == bc.rb_model.RouterL3AgentBinding.router_id)<EOL>ns_routertype_id = plugin.get_namespace_router_type_id(context)<EOL>query = context.session.query(bc.Router.id)<EOL>query = query.join(l3_models.RouterHostingDeviceBinding)<EOL>query = query.filter(<EOL>l3_models.RouterHostingDeviceBinding.router_type_id ==<EOL>ns_routertype_id, no_agent_binding)<EOL>unscheduled_router_ids = [router_id_[<NUM_LIT:0>] for router_id_ in query]<EOL>if unscheduled_router_ids:<EOL><INDENT>return plugin.get_routers(<EOL>context, filters={'<STR_LIT:id>': unscheduled_router_ids})<EOL><DEDENT>return []<EOL>
Get routers with no agent binding.