CLICompoundValueFormat

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:

 

param_name=value

 

 

A list (the two versions are equivalent):

 

param_name=a,b,c
param_name=[a,b,c]

 

 

Nested lists:

 

param_name=[a,b,[c,d]]

 

 

A list of properties:

 

param_name=[a=b,c=d]

 

 

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

 

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

 

 

Object with a property of type list:

 

param_name=a=b,c=[d,e]

 

 

Object with a child of type object:

 

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

 

 

Object with a complex property list:

 

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

 

 

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