#NEWLINE# def _get_port_id_for_router_interface( self , context , router_id , subnet_id ) : #NEWLINE# #INDENT# filters = { #NEWLINE# #INDENT# 'device_id' : [ router_id ] , #NEWLINE# 'device_owner' : [ q_const . DEVICE_OWNER_ROUTER_INTF ] , #NEWLINE# 'fixed_ips' : { #NEWLINE# #INDENT# 'subnet_id' : [ subnet_id ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# ports = self . _core_plugin . get_ports ( context . elevated ( ) , filters = filters ) #NEWLINE# return ports [ 0 ] [ 'id' ]