HP P2000 G3 MSA System CLI Reference Guide
19
The output of each CLI command is composed of valid XML data until the CLI prompt (typically
#
) is
encountered. The output contains a valid XML header followed by the XML elements described in the
following table.
Scripting guidelines
When scripting command input, use CLI syntax as defined in this guide. For use with Telnet or SSH, use a
space character between command names, parameters, and their values (as shown throughout this guide).
For use with the HTTP interface, use a ’/’ character instead of a space character between command
names, parameters, and their values.
When writing scripts to parse XML API output, use an XML library to parse the data. For parsing, a script
should
not
rely on ordering, spacing, or column position. To find a specific property, a script should
compare property names as it searches through the data. This allows the script to be compatible with future
versions that could potentially add new fields to the output.
Table 3
XML API elements
Element
Description and attributes
RESPONSE
The
RESPONSE
element is the top-level element, which contains all data output for the CLI command
that was issued. The response includes:
•
A number of
OBJECT
elements, which varies by command.
•
A status object that provides a message and return code. A return code of 0 indicates that the
command succeeded. Any other return code is an error code.
There is only one
RESPONSE
element per issued command.
OBJECT
In general, an
OBJECT
element describes a storage-system component such as a disk or a volume. An
object has these attributes:
•
basetype
. This attribute allows output in brief mode to be correlated with metadata to reduce the
overhead of each command, as described in
XML API optimization
. This is also a good field to
use to detect the type of the object (e.g., a disk, a volume, etc.).
•
name
. The name of the object.
•
oid
. The unique identifier for the object in the scope of the response.
The
OBJECT
element can contain
PROPERTY
elements.
PROPERTY
A
PROPERTY
element provides detail about the attributes of an
OBJECT
. A property has these
attributes:
•
name
. The unique name for the property within the object.
•
key
. Indicates whether this property is a key value to identify this object.
•
type
. The type of data represented by the element data.
•
size
. Typically the maximum size of the output. Usually only important if the console output is
displayed in rows.
•
draw
. Whether to show or hide this data in console format.
•
sort
. The type of sorting that can be applied to this property.
•
display-name
. The label for this data to show in user interfaces.
COMP
A
COMP
(composition) element associates nested objects, such as a task object within a schedule
object. A composition element has these attributes:
•
P
. The oid of the part component.
•
G
. The oid of the group component.
An alternative to using
COMP
elements is described in
XML API optimization
.
ASC
The association element provides a simple association description between two objects in the response.
•
A
. First object.
•
B
. Second object.
Summary of Contents for P2000 G3
Page 1: ...HP P2000 G3 MSA System CLI Reference Guide Part number 500912 009 First edition February 2014 ...
Page 14: ...14 About this guide ...
Page 30: ...30 Categorical list of commands ...
Page 199: ...HP P2000 G3 MSA System CLI Reference Guide 199 See also set cache parameters show volumes ...
Page 294: ...294 Alphabetical list of commands See also set volume set vdisk ...
Page 498: ...498 XML API basetype properties PROPERTY name mrc version type uint8 0 PROPERTY OBJECT ...
Page 524: ...524 Glossary ...
Page 532: ...532 Index ...