Donald Naro created ISPN-12699:
----------------------------------
Summary: REST API should allow cache template creation
Key: ISPN-12699
URL:
https://issues.redhat.com/browse/ISPN-12699
Project: Infinispan
Issue Type: Enhancement
Components: REST
Affects Versions: 12.0.0.Final
Reporter: Donald Naro
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>
--
This message was sent by Atlassian Jira
(v8.13.1#813001)