code: def avail_images(call=None):
      '''
      Return a list of the images that are on the provider
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The avail_images function must be called with '
              '-f or --function, or with the --list-images option'
          )
  
      items = query(action='template')
      ret = {}
      for item in items:
          ret[item.attrib['name']] = item.attrib
  
      return ref avail_images(call=None):
      '''
      Return a list of the images that are on the provider
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The avail_images function must be called with '
              '-f or --function, or with the --list-images option'
          )
  
      items = query(action='template')
      ret = {}
      for item in items:
          ret[item.attrib['name']] = item.attrib
  
      return ret
docs: Return a list of the images that are on the provider