HP XP7 Command View Advanced Edition CLI Reference Guide (TK981-96006, May 2014)
Input rules for command lines in batch files
The commands that you want to execute together must be specified between beginbatch and
endbatch in a batch file. The input rules for each command line are as follows:
• Only the command to be executed and the command parameters can be specified on each com-
mand line. URLs, options, or help cannot be specified.
• Parameters common to each command line cannot be specified in a properties file.
• The same parameter cannot be specified multiple times on the same command line.
• Parameters that cannot be used on the same command line cannot be specified.
For example, when executing the DeleteLun command, the port parameter and the portname
parameter cannot be specified at the same time on the same command line.
• Command parameters and specified values cannot be enclosed in " and '.
• Aside from parameter specifications, a \ must be specified to escape the following characters:
spaces ! " # $ % & ' ( ) * + < > ? @ [ \ ] ^ ` { | } ~
The following shows an example specification where Lun10 HOST2, a string containing a space,
is specified for the name parameter.
hdvmcli AddLun name=Lun10\ HOST2 model=XP12000 serialnum=14053
Conditions for parameters for processing a group of commands in a batch file
To execute a group of commands in a batch file, the following conditions must be satisfied for parameter
values and for combinations of parameters on consecutive command lines. If the necessary conditions
are satisfied, multiple commands are executed at the same time.
• Condition-1: Specify the same values as the previous lines.
This means that the same parameters and parameter values as previous lines must be specified.
If you specify the same parameter but use a different value, the commands are not executed to-
gether.
For example, if you specify model=XP12000 for the AddExternalArrayGroup command in
the first line, you also need to specify model=XP12000 in the second line to execute commands
together.
In addition, for a parameter for which the default value is set when you omit the parameter, you
need to specify the parameter in the following line exactly as in the previous line.
For example, if you omit the luoption parameter of the AddExternalArrayGroup command,
luoption=none is assumed. To execute commands together, if you omit the parameter in the
first line, you also need to do so in the next line. If you specify luoption=none in the first line,
you also need to do so in the next line.
• Condition-2: Specify the same parameters as the previous lines.
This means that the same parameters as previous lines must be specified. If you specify the same
parameter, the commands are executed together even if the parameter value is different from the
previous line.
For example, if you specify the port and domain parameters for the AddLun command in the
first line, you also need to specify the same parameters in the second line to execute the AddLun
commands together. If you add a parameter that is not specified in the first line, for example, if
you specify port, domain, and devnum parameters in the second line, the commands are not
executed together.
CLI Reference Guide 505