<div dir="ltr"><div>You are right. I was mixing the two.<br></div>And when doing some client last time I was indeed using CLI api for that.<br><div><br></div><div>Looking at the code, there is only one method we would really need to use <br></div><div>CommandContext#buildRequest(String) <a href="https://github.com/wildfly/wildfly-core/blob/master/cli/src/main/java/org/jboss/as/cli/CommandContext.java#L278">https://github.com/wildfly/wildfly-core/blob/master/cli/src/main/java/org/jboss/as/cli/CommandContext.java#L278</a><br><br></div><div>Which translates CLI command to DMR one.<br><br>So in any case, CLI is a way to go. how that is different question.<br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 5, 2014 at 11:22 AM, Kabir Khan <span dir="ltr"><<a href="mailto:kabir.khan@jboss.com" target="_blank">kabir.khan@jboss.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On 5 Sep 2014, at 09:59, Tomaž Cerar <<a href="mailto:tomaz.cerar@gmail.com">tomaz.cerar@gmail.com</a>> wrote:<br>
<br>
><br>
> On Thu, Sep 4, 2014 at 11:17 PM, Stuart Douglas <<a href="mailto:stuart.w.douglas@gmail.com">stuart.w.douglas@gmail.com</a>> wrote:<br>
> The problem with 3 is that for the most part users do not use DMR directly, they use the CLI, and all our documentation reflects this. If we use DMR directly for this it just one more thing that we require our users to learn.<br>
><br>
><br>
> 90%+ of what users do in CLI is direct DMR.<br>
> Things that CLI adds that are not part of native DMR are handlers like:<br>
><br>
> - ls (instead of :read-resource),<br>
> - reload (instead of :reload)<br>
> - try,catch<br>
> - batch*<br>
> - if, else<br>
> - clear, quit<br>
> + some others<br>
><br>
> but in general most of the commands people write are direct DMR.<br>
> CLI only adds lots of usability features on top of them like tab completion.<br>
><br>
> for example<br>
> /subsystem=io/worker=new-worker:add()<br>
> is 100% dmr operation.<br>
</span>Yes, but isn’t the issue that it is nicer for end users, who are used to the CLI to write this rather than either using the serialized forms of the the DMR representation, e.g. either (raw DMR)<br>
{<br>
"address" => [<br>
("subsystem" => "io"),<br>
("worker" => "new-worker")<br>
],<br>
"operation" => “add”<br>
}<br>
or (JSON)<br>
{<br>
"address" : [<br>
{<br>
"subsystem" : "io"<br>
},<br>
{<br>
"worker" : "new-worker"<br>
}<br>
],<br>
"operation" : "add"<br>
}<br>
is is a lot more usable to just be able to say<br>
/subsystem=io/worker=new-worker:add()<br>
<span class="im HOEnZb"><br>
<br>
><br>
> In any case if we go with WildFly embedded in CLI mode all this discussion is non issue.<br>
><br>
><br>
</span><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> wildfly-dev mailing list<br>
> <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
<br>
</div></div></blockquote></div><br></div>