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

Inputting requests from XML documents
CAUTION:
To use the XML-API CLI feature, you need thorough knowledge of XML-API, and need to take great
care in formulating commands.
Rather than specifying the command and parameters from the command line, the request can originate
from a file. The file must contain a valid XML document in the correct form for a Device Manager
request. The command line option -i or --input specifies the input file. The other options are still
valid. However, any command or parameter specified from the command line or in the properties
file is ignored, because that information is already in the XML document.
The -i <file-name> option allows you to specify an xml message file. You can use this feature to
request multiple operations from the CLI command, which can save considerable time.
For example, usually the AddLun command specifies creation of a single LUN. The AddLun XML-API
allows you to create multiple LUNs with a single request.
Syntax:
hdvmcli [-t] AddLun
serialnum=serial-number model=model
port=port-number domain=domain-ID
scsi=SCSI-ID lun=valid-LUN devnum=device-number
From the command line, specify the -t option and the AddLUN command as follows, and then execute
hdvmcli.
hdvmcli -t AddLun
serialnum=15045 model=XP1024/XP128
port=0 domain=0 scsi=15 lun=100 devnum=1
The XML-API request that follows the AddLUN command executed by using hdvmcli is output to the
message destination file (MessageTrace.log).
<?xml version="1.0" encoding="UTF-8"?>
<HiCommandServerMessage>
<APIInfo version="7.3.1" />
<Request>
<StorageManager>
<Add target="LUN">
<StorageArray objectID="ARRAY.XP1024/XP128.15045">
<Path portID="0" domainID="0" scsiID="15" lun="100" devNum="1" />
</StorageArray>
</Add>
</StorageManager>
</Request>
</HiCommandServerMessage>
Create a file by specifying multiple LUNs as follows:
Properties file406