[wildfly-dev] HTTP API support for plain JBoss-CLI commands

Brian Stansberry brian.stansberry at redhat.com
Mon Jun 1 13:13:33 EDT 2015


On 5/29/15 12:48 PM, Jason T. Greene wrote:
>
>> On May 29, 2015, at 12:27 PM, Emmanuel Hugonnet <ehugonne at redhat.com> wrote:
>>
>>
>>
>> Le 29/05/2015 18:52, Jason Greene a écrit :
>>>
>>>> On May 29, 2015, at 9:34 AM, Alexey Loubyansky <alexey.loubyansky at redhat.com> wrote:
>>>>
>>>>> On 05/29/2015 02:51 PM, Darran Lofthouse wrote:
>>>>> What we really have internally is a HTTP management interface and we
>>>>> used to expose a native (JBoss Remoting) management interface that the
>>>>> CLI would connect to - subsequently the CLI does connect to the HTTP
>>>>> management interface but it performs a HTTP upgrade to now talk Remoting
>>>>> over HTTP using DMR formatted messages.
>>>>>
>>>>> For the HTTP management interface json was selected as the payload type
>>>>> so that clients could be written in many languages that have libraries
>>>>> to talk HTTP and handle json.
>>>>>
>>>>> The CLI was then subsequently developed but with an emphasis on
>>>>> assisting administrators constructing a request so things like tab
>>>>> completion and automatic conversion.
>>>>>
>>>>> A couple of things this thread throws up that I think could be useful: -
>>>>>   - The ability to enter raw json requests into the CLI.
>>>>
>>>> There is a Jira issue open for this
>>>> https://issues.jboss.org/browse/WFCORE-418
>>>>
>>>>>   - The ability to output the json representation of a command
>>>>> constructed by the CLI.
>>>>
>>>> This is an easy one. There is echo-dmr command already. It could accept
>>>> --json argument to further transform the result to JSON.
>>>
>>> Additionally I think we need:
>>>
>>> - Ability to transform a ModelNode into CLI calls, and potentially code in various languages (WFCORE-721)
>>> - Enhance the HTTP server API to follow REST patterns, including JSON patching (WFCORE-722)
>>> - Add support for CLI style addressing within a ModelNode operation (instead of doing a list of kv pairs, you just pass it a CLI style address string(“/foo=bar/blah=something/etc=etc”)
>>
>> This last bit is already in WF9 ;) https://issues.jboss.org/browse/WFCORE-537
>> Emmanuel
>
> Awesome! I didn't realize it was already in.
>

That handles the address param in a more friendly fashion, but it's not 
full support of CLI syntax. That is this works now:

{
  "operation"="add",
  "address"="/foo=bar/blah=something/etc=etc",
  "thingy"=2
}

but "/foo=bar/blah=something/etc=etc:add(thingy=2)" would not.

>>
>>>
>>> --
>>> Jason T. Greene
>>> WildFly Lead / JBoss EAP Platform Architect
>>> JBoss, a division of Red Hat
>>>
>>>
>>> _______________________________________________
>>> wildfly-dev mailing list
>>> wildfly-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>


-- 
Brian Stansberry
Senior Principal Software Engineer
JBoss by Red Hat


More information about the wildfly-dev mailing list