#NEWLINE# def _create_ssh( self ) : #NEWLINE# #INDENT# 'Create ssh connection' #NEWLINE# try : #NEWLINE# #INDENT# self . _client = paramiko . SSHClient ( ) #NEWLINE# self . _client . set_missing_host_key_policy ( paramiko . AutoAddPolicy ( ) ) #NEWLINE# self . _client . connect ( self . _get_ip ( ) , username = 'root' , password = settings . PYRAX_PASSWORD ) #NEWLINE# #UNINDENT# except paramiko . AuthenticationException as e : #NEWLINE# #INDENT# logger . info ( 'SSH connection wait:{}' . format ( e ) ) #NEWLINE# self . _create_ssh ( ) #NEWLINE# #UNINDENT# logger . info ( 'SSH connection ready:{}' . format ( e . _name ) )