code: def host_list(call=None):
      '''
      Get a list of Xen Servers
  
      .. code-block:: bash
  
          salt-cloud -f host_list myxen
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'This function must be called with -f, --function argument.'
          )
      ret = {}
      session = _get_session()
      hosts = session.xenapi.host.get_all()
      for host in hosts:
          host_record = session.xenapi.host.get_record(host)
          ret[host_record['name_label']] = host_record
      return ref host_list(call=None):
      '''
      Get a list of Xen Servers
  
      .. code-block:: bash
  
          salt-cloud -f host_list myxen
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'This function must be called with -f, --function argument.'
          )
      ret = {}
      session = _get_session()
      hosts = session.xenapi.host.get_all()
      for host in hosts:
          host_record = session.xenapi.host.get_record(host)
          ret[host_record['name_label']] = host_record
      return ret
docs: Get a list of Xen Servers
  
      .. code-block:: bash
  
          salt-cloud -f host_list myxen