#NEWLINE# def GET( self ) : #NEWLINE# #INDENT# global config #NEWLINE# keyword_args = { #NEWLINE# #INDENT# 'q.field' : [ ] , #NEWLINE# 'q.op' : [ ] , #NEWLINE# 'q.type' : [ ] , #NEWLINE# 'q.value' : [ ] , #NEWLINE# #UNINDENT# } #NEWLINE# query_params = web . input ( ** keyword_args ) #NEWLINE# ( new_query , user_specified_tenants ) = filter_query_params ( query_params ) #NEWLINE# client = ceilometerclient ( ) #NEWLINE# meters = [ ] #NEWLINE# for ( k , v ) in config . items ( 'allowed_tenants' ) : #NEWLINE# #INDENT# if ( user_specified_tenants and ( k not in user_specified_tenants ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# final_query = [ ] #NEWLINE# final_query . extend ( new_query ) #NEWLINE# query = make_query ( tenant_id = k ) #NEWLINE# final_query . extend ( query ) #NEWLINE# logger . debug ( 'final query=%s' , final_query ) #NEWLINE# results = client . meters . list ( q = final_query ) #NEWLINE# meters . extend ( results ) #NEWLINE# #UNINDENT# return json . dumps ( [ ob . _info for ob in meters ] )