#NEWLINE# def log_curl_request( self , method , url , kwargs ) : #NEWLINE# #INDENT# curl = [ ( 'curl -i -X %s' % method ) ] #NEWLINE# for ( key , value ) in kwargs [ 'headers' ] . items ( ) : #NEWLINE# #INDENT# if ( key in ( 'X-Auth-Token' , 'X-Auth-Key' ) ) : #NEWLINE# #INDENT# value = '*****' #NEWLINE# #UNINDENT# header = ( "-H '%s: %s'" % ( strutils . safe_decode ( key ) , strutils . safe_decode ( value ) ) ) #NEWLINE# curl . append ( header ) #NEWLINE# #UNINDENT# conn_params_fmt = [ ( 'key_file' , '--key %s' ) , ( 'cert_file' , '--cert %s' ) , ( 'os_cacert' , '--cacert %s' ) ] #NEWLINE# for ( key , fmt ) in conn_params_fmt : #NEWLINE# #INDENT# value = self . ssl_connection_params . get ( key ) #NEWLINE# if value : #NEWLINE# #INDENT# curl . append ( ( fmt % value ) ) #NEWLINE# #UNINDENT# #UNINDENT# if self . ssl_connection_params . get ( 'insecure' ) : #NEWLINE# #INDENT# curl . append ( '-k' ) #NEWLINE# #UNINDENT# if ( 'data' in kwargs ) : #NEWLINE# #INDENT# curl . append ( ( "-d '%s'" % kwargs [ 'data' ] ) ) #NEWLINE# #UNINDENT# curl . append ( ( '%s%s' % ( self . endpoint , url ) ) ) #NEWLINE# LOG . debug ( ' ' . join ( curl ) )