#NEWLINE# def get_ips( init_host , compute_host , ssh_user ) : #NEWLINE# #INDENT# runner = remote_runner . RemoteRunner ( host = compute_host , user = ssh_user , gateway = cmd ) #NEWLINE# cmd = 'ifconfig | awk -F "[: ]+" \'/inet addr:/ { if ($4 != "127.0.0.1") print $4 }\'' #NEWLINE# out = runner . run ( cmd ) #NEWLINE# list_ips = [ ] #NEWLINE# for info in out . split ( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# ipaddr . IPAddress ( info ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# list_ips . append ( info ) #NEWLINE# #UNINDENT# return list_ips