Version 2

    Compound Operation Parameter (or Command Argument) Value Format

     

    Operation parameters of simple types (such as integer, boolean, string, etc) are easily expressed with a string (i.e. a word) value. Others (such as lists, properties, objects, etc) require a special syntax.

     

    These compound values can expressed in two formats. The first and the original one is the native DMR (Dynamic Model Representation) format. All the CLI operations and commands are translated into the DMR requests using org.jboss.dmr.ModelNode API. org.jboss.dmr.ModelNode has toString() and fromString(str) methods that output and read string representations of the DMR nodes in its specific format.

    You can see examples of values in this format in the Format of a Detyped Operation Request and the Format of a Detyped Operation Response articles or simply construct your own instances of org.jboss.dmr.ModelNode and call toString() on them.

     

    As you, probably, know, the DMR format is very verbose and not easy to type complex values in w/o making mistakes. This is why the CLI supports a simplified version of the format. Basically, it doesn't require quotes around the values and accepts '=' instead of '=>'.

     

    Here are a few examples (the examples show only the operation of command parameters w/o the rest of the operations, i.e. the address part and operation name.

     

    Simple string value:

     

    {code}param_name=value{code}

     

    A list (the two versions are equivalent):

     

    {code}

    param_name=a,b,c

    param_name=[a,b,c]{code}

     

    Nested lists:

     

    {code}param_name=[a,b,[c,d]]{code}

     

    A list of properties:

     

    {code}param_name=[a=b,c=d]{code}

     

    Values of type OBJECT (the two versions are equivalent):

     

    {code}param_name=a=b,c=d

    param_name={a=b,c=d}{code}

     

    Object with a property of type list:

     

    {code}param_name=a=b,c=[d,e]{code}

     

    Object with a child of type object:

     

    {code}param_name=a=b,c={d=e}{code}

     

    Object with a complex property list:

     

    {code}param_list=a=b,c=[d=e,f={g=h}]{code}

     

    These are, of course, simple but, hopefully, sufficient examples to give an idea of the compound value format.