#NEWLINE# def get_group_features( self , req , dpid , **_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# dp = self . dpset . get ( int ( dpid ) ) #NEWLINE# if ( dp is None ) : #NEWLINE# #INDENT# return Response ( status = 404 ) #NEWLINE# #UNINDENT# _ofp_version = _ofp_version . ofproto . OFP_VERSION #NEWLINE# _ofctl = supported_ofctl . get ( _ofp_version , None ) #NEWLINE# if ( ( _ofctl is not None ) and hasattr ( _ofctl , 'get_group_features' ) ) : #NEWLINE# #INDENT# groups = _ofctl . get_group_features ( dp , self . waiters ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOG . debug ( 'Unsupported OF protocol or                 request not supported in this OF protocol version' ) #NEWLINE# return Response ( status = 501 ) #NEWLINE# #UNINDENT# body = json . dumps ( groups ) #NEWLINE# return Response ( content_type = 'application/json' , body = body )