VCS pre-5.0 agents required that the arguments passed to the entry point to be in the order indicated by the ArgList attribute as it was defined in the resource type. The order of parsing the arguments was determined by their position the definition.
With the V50 agent framework, agents can use entry points that can be passed attributes and their values i a format of name-value tuples. Such a format means that attributes and their values are parsed by the name of the attribute and not by their position in the ArgList Attribute.
The general tuple format for V50 attributes in the ArgList is:
<name> <number_of_elements_in_value> <value>
For scalar attributes, whether string, integer, or boolean, the formatting is:
For vector attributes, whether string or integer, the formatting is:
<attribute_name> <number_of_values_in_vector> <values_in_vector>
For string keylist attributes, the formatting is:
<attribute_name> <number_of_keys_in_keylist> <keys>
DiskAttr 4 hdisk3 hdisk4 hdisk5 hdisk6
For association attributes, whether string or integer, the formatting is:
<attribute_name> <number_of_keys_and_values> <values_of_keylist>
Note the following comparison.
VCSHOME="${VCS_HOME:-/opt/VRTSvcs}"
. $VCSHOME/bin/ag_i18n_inc.sh;
VCSAG_GET_ATTR_VALUE "Attr1" -1 1 "$@";
attr1_value=${VCSAG_ATTR_VALUE};
VCSAG_GET_ATTR_VALUE "Attr2" -1 1 "$@";
attr2_value=${VCSAG_ATTR_VALUE};