code: def template_list(call=None):
      '''
      Return available Xen template information.
  
      This returns the details of
      each template to show number cores, memory sizes, etc..
  
      .. code-block:: bash
  
         salt-cloud -f template_list myxen
  
      '''
      templates = {}
      session = _get_session()
      vms = session.xenapi.VM.get_all()
      for vm in vms:
          record = session.xenapi.VM.get_record(vm)
          if record['is_a_template']:
              templates[record['name_label']] = record
      return templatef template_list(call=None):
      '''
      Return available Xen template information.
  
      This returns the details of
      each template to show number cores, memory sizes, etc..
  
      .. code-block:: bash
  
         salt-cloud -f template_list myxen
  
      '''
      templates = {}
      session = _get_session()
      vms = session.xenapi.VM.get_all()
      for vm in vms:
          record = session.xenapi.VM.get_record(vm)
          if record['is_a_template']:
              templates[record['name_label']] = record
      return templates
docs: Return available Xen template information.
  
      This returns the details of
      each template to show number cores, memory sizes, etc..
  
      .. code-block:: bash
  
         salt-cloud -f template_list myxen