Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-12699

REST API should allow cache template creation

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 12.0.0.Final
    • REST
    • None
    • Undefined

      Currently possible to "GET rest/v2/cache-managers/default/cache-configs/templates"

      REST API should allow users to create cache templates via "POST rest/v2/cache-managers/default/cache-configs/templates/

      {custom-template}

      "

      At the moment you can create cache templates directly in infinispan.xml or with the CLI using the "task exec @@template@create -Pname=xsite-template -Pconfiguration=" command.

      "task exec" seems to be a bit limited when passing in Infinispan config.

      [host@cluster//containers/default]> task exec @@template@create -Pname=my-template -Pconfiguration='<replicated-cache name="my-template"/>'
      null

      The above call works, but returns "null" even though it creates the template. The cache template it creates is also pretty useless.

      Trying to use the same "task exec" with more complex config is a total danger zone.

      If you include "<cache-configuration>" tags the command barfs. And there is also this one:

      task exec @@template@create -Pname=xsite-template -Pconfiguration='<replicated-cache name="sessions-cfg" mode="SYNC"><locking acquire-timeout="0" /><backups><backup site="site2" strategy="SYNC" /></backups></replicated-cache>'

      Error: ISPN005031: The supplied configuration for cache 'xsite-template' is missing a named configuration for it: <replicated-cache name="sessions-cfg" mode="SYNC"><locking acquire-timeout="0" /><backups><backup site="site2" strategy="SYNC" /></backups></replicated-cache>

              karestig@redhat.com Katia Aresti
              dnaro@redhat.com Donald Naro
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: