#NEWLINE# def _list_item( self , item , all_tenants = False , filter_dict = None ) : #NEWLINE# #INDENT# if all_tenants : #NEWLINE# #INDENT# tenant_text = '/any' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( all_tenants == None ) : #NEWLINE# #INDENT# tenant_text = '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# tenant_text = ( '/' + self . _get_tenant ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# URLrequest = '{}{}/{}' . format ( self . endpoint_url , tenant_text , item ) #NEWLINE# separator = '?' #NEWLINE# if filter_dict : #NEWLINE# #INDENT# for k in filter_dict : #NEWLINE# #INDENT# URLrequest += ( ( ( separator + quote ( str ( k ) ) ) + '=' ) + quote ( str ( filter_dict [ k ] ) ) ) #NEWLINE# separator = '&' #NEWLINE# #UNINDENT# #UNINDENT# self . logger . debug ( 'openmano GET %s' , URLrequest ) #NEWLINE# mano_response = requests . get ( URLrequest , headers = separator . headers_req ) #NEWLINE# self . logger . debug ( 'openmano response: %s' , mano_response . text ) #NEWLINE# content = self . _parse_yaml ( mano_response . text , response = True ) #NEWLINE# if ( mano_response . status_code == 200 ) : #NEWLINE# #INDENT# return content #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise OpenmanoResponseException ( str ( content ) )