code: def __get_host(node, vm_):
      '''
      Return public IP, private IP, or hostname for the libcloud 'node' object
      '''
      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: %s', ip_address)
      else:
          ip_address = node.public_ips[0]
          log.info('Salt node data. Public_ip: %s', ip_address)
  
      if ip_address:
          return ip_address
  
      return node.namf __get_host(node, vm_):
      '''
      Return public IP, private IP, or hostname for the libcloud 'node' object
      '''
      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: %s', ip_address)
      else:
          ip_address = node.public_ips[0]
          log.info('Salt node data. Public_ip: %s', ip_address)
  
      if ip_address:
          return ip_address
  
      return node.name
docs: Return public IP, private IP, or hostname for the libcloud 'node' object