<div dir="ltr">Thanks a lot for all tips.<div><br></div><div>It seems Tristan's solution fits the best. I've just tried it out and it seems to do the job:</div><div>> ./cli.sh</div><div>> embed-server --server-config=cloud.xml --std-out=echo</div><div>> /subsystem=datagrid-infinispan-endpoint/rest-connector=rest-connector:remove</div><div>> stop-embedded-server</div><div><br></div><div>I might wrap some of the commands with a simple bash script (e.g. when I need to incorporate it into larger commands including grep, awk or sed) but it's more or less what I needed.</div><div><br></div><div>Thanks,</div><div>Sebastian</div><div><br><div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 28, 2017 at 7:46 PM Tristan Tarrant <<a href="mailto:ttarrant@redhat.com">ttarrant@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For server the tool already exists: the server CLI can work in offline<br>
mode and manipulate a configuration using DMR ops.<br>
<br>
Tristan<br>
<br>
On 8/28/17 1:41 PM, Sebastian Laskawiec wrote:<br>
> Hey,<br>
><br>
> Our cloud integration bits require a tool for adjusting the<br>
> configuration for certain use cases. A common example would be - take<br>
> this `cloud.xml` file, remove all caches, add a new, replicated cache as<br>
> default one.<br>
><br>
> The tool should take either configuration or a file name as input (e.g.<br>
> `config-tool --add-default-cache -f cloud.xml` or `cat cloud.xml |<br>
> config-tool --add-default-cache > cloud-new.xml`) and print out<br>
> configuration either to System Out or to a file.<br>
><br>
> Do you have any ideas what could I use to write such a tool? Those<br>
> technologies come into my mind:<br>
><br>
> * Perl<br>
> * Python<br>
> * Java (probably with some XPath library)<br>
><br>
> Thoughts? Ideas? Recommendations?<br>
><br>
> Thanks,<br>
> Sebastian<br>
> --<br>
><br>
> SEBASTIANŁASKAWIEC<br>
><br>
> INFINISPAN DEVELOPER<br>
><br>
> Red HatEMEA <<a href="https://www.redhat.com/" rel="noreferrer" target="_blank">https://www.redhat.com/</a>><br>
><br>
> <<a href="https://red.ht/sig" rel="noreferrer" target="_blank">https://red.ht/sig</a>><br>
><br>
><br>
> _______________________________________________<br>
> infinispan-dev mailing list<br>
> <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
><br>
<br>
--<br>
Tristan Tarrant<br>
Infinispan Lead<br>
JBoss, a division of Red Hat<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></blockquote></div></div></div></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p class="inbox-inbox-inbox-fullname-container" style="box-sizing:border-box;color:rgb(0,0,0);font-family:overpass,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase"><span class="inbox-inbox-inbox-firstname-container" style="box-sizing:border-box">SEBASTIAN</span><span class="inbox-inbox-inbox-Apple-converted-space"> </span><span class="inbox-inbox-inbox-lastname-container" style="box-sizing:border-box">ŁASKAWIEC</span></p><p class="inbox-inbox-inbox-position-container" style="box-sizing:border-box;color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:10px;margin:0px 0px 4px;text-transform:uppercase"><span class="inbox-inbox-inbox-position" style="box-sizing:border-box">INFINISPAN DEVELOPER</span></p><p class="inbox-inbox-inbox-legal-container" style="box-sizing:border-box;font-family:overpass,sans-serif;margin:0px;font-size:10px;color:rgb(153,153,153)"><a class="inbox-inbox-inbox-redhat-anchor" href="https://www.redhat.com/" target="_blank" style="box-sizing:border-box;color:rgb(0,136,206);margin:0px;text-decoration:none">Red Hat<span class="inbox-inbox-inbox-Apple-converted-space"> </span><span style="box-sizing:border-box">EMEA</span></a></p><table border="0" style="box-sizing:border-box;color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"><tbody style="box-sizing:border-box"><tr style="box-sizing:border-box"><td width="100px" style="box-sizing:border-box"><a href="https://red.ht/sig" style="box-sizing:border-box"><img width="90" height="auto" style="box-sizing: border-box;" src="https://www.redhat.com/files/brand/email/sig-redhat.png"></a></td></tr></tbody></table></div></div>