#NEWLINE# def _router_has_binding( self , context , router_id , l3_agent_id ) : #NEWLINE# #INDENT# router_binding_model = l3_agentschedulers_db . RouterL3AgentBinding #NEWLINE# query = context . session . query ( router_binding_model ) #NEWLINE# query = query . filter ( ( context . router_id == router_id ) , ( router_binding_model . l3_agent_id == l3_agent_id ) ) #NEWLINE# return ( query . count ( ) > 0 )