EasyManuals Logo

HP P2000 Reference Guide

HP P2000
448 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #18 background imageLoading...
Page #18 background image
18 Using the CLI
$sessionKey = $prop->textContent;
}
}
print "Session Key = $sessionKey\n";
# Run a sample command to obtain the disks in the system.
$url = 'http://10.0.0.2/api/show/disks';
$req = HTTP::Request->new(GET => $url);
$req->header('sessionKey' => $sessionKey );
$req->header('dataType' => 'ipa' );
$res = $ua->request($req);
$url2 = 'http://10.0.0.2/api/exit';
$req2 = HTTP::Request->new(GET => $url3);
$req2->header('sessionKey' => $sessionKey );
$req2->header('dataType' => 'api' );
$res2 = $ua->request($req2);
print $res->content;
The next section provides more information about using the XML API.
Using the XML API
The Management Controller provides access for monitoring and management via the Telnet and SSH
protocols for command-line interface semantics, or via the HTTP and HTTPS protocols for XML API
request/response semantics.
You can use an XML parser, such as XML::Parser in Perl, to process the XML output and store this
information as objects. The XML parser should use the Document Type Definition (DTD) version that
corresponds to the firmware level to ensure that the XML is validated. The DTD provides the structure of all
content returned by the CLI when XML API format is enabled. By obtaining the latest DTD for validation, the
parser will be forward compatible. To obtain the DTD, go to http://hp.com/go/p2000
.
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.
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.

Table of Contents

Other manuals for HP P2000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP P2000 and is the answer not in the manual?

HP P2000 Specifications

General IconGeneral
Drive SupportSAS
ControllerDual Controller options available
Host Interface6Gb SAS, 8Gb FC, 1Gb iSCSI
RAID LevelsRAID 0, 1, 5, 6, 10
Storage TypeSSD
Hot-swappable ComponentsDrives, controllers, power supplies, fans
Dimensions8.9 x 44.8 x 63.5 cm (3.5 x 17.6 x 25 inches)
Drive BaysUp to 12 LFF or 24 SFF drive bays per enclosure

Related product manuals