HP P9000 Command View Advanced Edition Suite Software 7.3.1-00 CLI Reference Guide

Creating batch files
This section describes the input rules and conditions for creating batch files.
Batch file format and input rules
The batch file format is as follows:
beginbatch
hdvmcli command parameter
hdvmcli command parameter
.
.
endbatch
The input rules for batch files are as follows:
Only ASCII encoded characters can be used in batch files.
A batch file must have beginbatch on the first line and endbatch on the last line.
Begin a new line after the character string endbatch.
If you do not do this, an error occurs.
Only one type of command can be set in a single batch file.
Only one type of storage system can be set in a single batch file.
Up to 1,500 commands can be specified in a single batch file.
Some parameter values are case sensitive.
Input rules for each command line
The commands to be executed together are specified between beginbatch and endbatch. 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
Batch functionality380