#NEWLINE# @ staticmethod #NEWLINE# def get_connection_params( endpoint , **kwargs ) : #NEWLINE# #INDENT# parts = urlparse . urlparse ( endpoint ) #NEWLINE# path = parts . path #NEWLINE# path = path . rstrip ( '/' ) . rstrip ( API_VERSION ) #NEWLINE# _args = ( parts . hostname , parts . port , path ) #NEWLINE# _kwargs = { #NEWLINE# #INDENT# 'timeout' : ( float ( kwargs . get ( 'timeout' ) ) if kwargs . get ( 'timeout' ) else 600 ) , #NEWLINE# #UNINDENT# } #NEWLINE# if ( parts . scheme == 'https' ) : #NEWLINE# #INDENT# _class = VerifiedHTTPSConnection #NEWLINE# _kwargs [ 'ca_file' ] = kwargs . get ( 'ca_file' , None ) #NEWLINE# _kwargs [ 'cert_file' ] = kwargs . get ( 'cert_file' , None ) #NEWLINE# _kwargs [ 'key_file' ] = kwargs . get ( 'key_file' , None ) #NEWLINE# _kwargs [ 'insecure' ] = kwargs . get ( 'insecure' , False ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( parts . scheme == 'http' ) : #NEWLINE# #INDENT# _class = six . moves . http_client . HTTPConnection #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# msg = ( 'Unsupported scheme: %s' % parts . scheme ) #NEWLINE# raise exceptions . EndpointException ( msg ) #NEWLINE# #UNINDENT# #UNINDENT# return ( _class , _args , _kwargs )