Results of CLI commands

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Results of CLI commands

Panzer, Robert

Hi,

 

I surely missed discussions about this, but playing aroung with the CLI I was wondering why the format of the output is somehow similar to JSON but not exactly like it.

For example for a command like this:

/subsystem=datasources/xa-data-source=JDBC_XA_DATASOURCE/:write-attribute(name=min-pool-size,value=10)

I get this response:

{

    "outcome" => "success",

    "response-headers" => {"process-state" => "reload-required"}

}

 

Wouldn’t it be nice to have a response like this?

{

    outcome : "success",

    response-headers : { process-state : "reload-required"}

}

 

Surely a stupid question but I was just wondering.

 

Kind regards,

Robert

 

 

WINCOR NIXDORF International GmbH
Sitz der Gesellschaft: Paderborn
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193

Diese E-Mail enthält vertrauliche Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential information.
If you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Results of CLI commands

Alexey Loubyansky
These are operation requests, commands follow a more friendly syntax and
are supposed to format results also more friendly (atm, not all of them
are there yet).

As to the format you are seeing, this is raw ModelNode.toString(). It's
not only the output, but operation parameter values of complex types are
also accepted in this format (although, a few alternative simplified
syntaxes for common complex types are supported as well).

Perhaps, there could a cli config option to specify the preferred format.

Alexey

On 01/20/2012 11:08 AM, Panzer, Robert wrote:

> Hi,
>
> I surely missed discussions about this, but playing aroung with the CLI
> I was wondering why the format of the output is somehow similar to JSON
> but not exactly like it.
>
> For example for a command like this:
>
> /subsystem=datasources/xa-data-source=JDBC_XA_DATASOURCE/:write-attribute(name=min-pool-size,value=10)
>
>
> I get this response:
>
> {
>
> "outcome" => "success",
>
> "response-headers" => {"process-state" => "reload-required"}
>
> }
>
> Wouldn’t it be nice to have a response like this?
>
> {
>
> outcome : "success",
>
> response-headers : { process-state : "reload-required"}
>
> }
>
> Surely a stupid question but I was just wondering.
>
> Kind regards,
>
> Robert
>
>     *WINCOR NIXDORF International GmbH*
>     Sitz der Gesellschaft: Paderborn
>     Registergericht Paderborn HRB 3507
>     Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach,
>     Dr. Jürgen Wunram
>     Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
>     Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 -
>     WEEE-Reg.-Nr. DE44477193
>
>     Diese E-Mail enthält vertrauliche Informationen.
>     Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
>     irrtümlich erhalten haben,
>     informieren Sie bitte sofort den Absender und vernichten Sie diese
>     E-Mail.
>     Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail
>     ist nicht gestattet.
>
>     This e-mail may contain confidential information.
>     If you are not the intended recipient (or have received this e-mail
>     in error)
>     please notify the sender immediately and destroy this e-mail.
>     Any unauthorised copying, disclosure or distribution of the material
>     in this e-mail is strictly forbidden.
>
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev