def __get_host(node, vm_):
 if ((__get_ssh_interface(vm_) == 'private_ips') or (vm_['external_ip'] is None)):
  ip_address = node.private_ips[0]
  log.info('Salt node data. Private_ip: {0}'.format(ip_address))
 else:
  ip_address = node.public_ips[0]
  log.info('Salt node data. Public_ip: {0}'.format(ip_address))
 if (len(ip_address) > 0):
  return ip_address
 return node.name

def __get_host ( node , vm_ ) : if ( ( __get_ssh_interface ( vm_ ) == 'private_ips' ) or ( vm_ [ 'external_ip' ] is None ) ) : ip_address = node . private_ips [ 0 ] log . info ( 'Salt node data. Private_ip: {0}' . format ( ip_address ) ) else : ip_address = node . public_ips [ 0 ] log . info ( 'Salt node data. Public_ip: {0}' . format ( ip_address ) ) if ( len ( ip_address ) > 0 ) : return ip_address return node . name
return public ip .