#NEWLINE# def get_queue_desc( self , req , dpid , port , queue , **_kwargs ) : #NEWLINE# #INDENT# if ( ( type ( dpid ) == str ) and ( not dpid . isdigit ( ) ) ) : #NEWLINE# #INDENT# LOG . debug ( 'invalid dpid %s' , dpid ) #NEWLINE# return Response ( status = 400 ) #NEWLINE# #UNINDENT# if ( ( type ( port ) == str ) and ( not port . isdigit ( ) ) ) : #NEWLINE# #INDENT# LOG . debug ( 'invalid port %s' , port ) #NEWLINE# return Response ( status = 400 ) #NEWLINE# #UNINDENT# if ( ( type ( queue ) == str ) and ( not queue . isdigit ( ) ) ) : #NEWLINE# #INDENT# LOG . debug ( 'invalid queue %s' , queue ) #NEWLINE# return Response ( status = 400 ) #NEWLINE# #UNINDENT# dp = self . dpset . get ( int ( dpid ) ) #NEWLINE# port = int ( port ) #NEWLINE# queue = int ( queue ) #NEWLINE# if ( dp is None ) : #NEWLINE# #INDENT# return Response ( status = 404 ) #NEWLINE# #UNINDENT# _ofp_version = dp . ofproto . OFP_VERSION #NEWLINE# _ofctl = supported_ofctl . get ( _ofp_version , None ) #NEWLINE# if ( _ofctl is not None ) : #NEWLINE# #INDENT# queues = _ofctl . get_queue_desc_stats ( dp = dp , port_no = _kwargs , waiters = self . waiters ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOG . debug ( 'Unsupported OF protocol' ) #NEWLINE# return Response ( status = 501 ) #NEWLINE# #UNINDENT# body = json . dumps ( queues ) #NEWLINE# return Response ( content_type = 'application/json' , body = body )