code: def avail_images(call=None):
      '''
      Return a dict of all available VM images on the cloud provider.
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The avail_images function must be called with '
              '-f or --function, or with the --list-images option'
          )
  
      ret = {}
      conn = get_conn()
      response = conn.getCreateObjectOptions()
      for image in response['operatingSystems']:
          ret[image['itemPrice']['item']['description']] = {
              'name': image['itemPrice']['item']['description'],
              'template': image['template']['operatingSystemReferenceCode'],
          }
      return ref avail_images(call=None):
      '''
      Return a dict of all available VM images on the cloud provider.
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The avail_images function must be called with '
              '-f or --function, or with the --list-images option'
          )
  
      ret = {}
      conn = get_conn()
      response = conn.getCreateObjectOptions()
      for image in response['operatingSystems']:
          ret[image['itemPrice']['item']['description']] = {
              'name': image['itemPrice']['item']['description'],
              'template': image['template']['operatingSystemReferenceCode'],
          }
      return ret
docs: Return a dict of all available VM images on the cloud provider.