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 #20 background imageLoading...
Page #20 background image
20 Using the CLI
In a script, each command should check the previous command’s status before proceeding. If the value of
the status object’s return-code property is 0, the command succeeded; any other value means that
the command failed.
XML API examples
The following example shows the same command, formatted for use with the command-line interface or for
use with the HTTP interface, and its XML API output.
• Command-line interface format:
create vdisk level r5 disks 2.6,2.7,2.8 vd-1
• HTTP interface format:
create/vdisk/level/r5/disks/2.6,2.7,2.8/vd-1
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RESPONSE VERSION="L100">
<OBJECT basetype="status" name="status" oid="1">
<PROPERTY name="response-type" type="string" size="12" draw="false"
sort="nosort" display-name="Response Type">Success</PROPERTY>
<PROPERTY name="response-type-numeric" type="uint32" size="12" draw="false"
sort="nosort" display-name="Response Type">0</PROPERTY>
<PROPERTY name="response" type="string" size="180" draw="true" sort="nosort"
display-name="Response">Command completed successfully. (vd-1) - The vdisk was
created.</PROPERTY>
<PROPERTY name="return-code" type="sint32" size="15" draw="false"
sort="nosort" display-name="Return Code">0</PROPERTY>
<PROPERTY name="component-id" type="string" size="80" draw="false"
sort="nosort" display-name="Component ID">vd-1</PROPERTY>
<PROPERTY name="time-stamp" type="string" size="25" draw="false"
sort="datetime" display-name="Time">2010-08-10 12:07:18</PROPERTY>
<PROPERTY name="time-stamp-numeric" type="uint32" size="25" draw="false"
sort="datetime" display-name="Time">1281442038</PROPERTY>
</OBJECT>
</RESPONSE>
XML API optimization
The following are two ways to optimize XML API performance:
• Use embedded objects. This allows one object to contain not only properties but also other objects. In
general, parsing a structure such as this is easier as the association between objects is simpler. This is
an alternative to using COMP elements.
• Use brief mode. Brief mode, which is disabled by default, shows only the name, key, and type
attributes of objects in normal commands. Other properties can be obtained by using the meta
command with the basetype of the object. This optimization reduces the number of bytes transmitted for
each request and allows caching of CLI metadata. Brief mode can be enabled or disabled by using the
set cli-parameters command.
In the following example, which uses brief mode, embedded objects contain media-specific detail for ports:
# show ports
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RESPONSE VERSION="L100">
<OBJECT basetype="port" name="name" oid="1" format="rows">
<PROPERTY name="durable-id">hostport_A1</PROPERTY>
<PROPERTY name="controller" key="true">A</PROPERTY>
<PROPERTY name="controller-numeric" key="true">1</PROPERTY>
<PROPERTY name="port" key="true">A1</PROPERTY>
<PROPERTY name="port-type" type="string">FC</PROPERTY>
<PROPERTY name="port-type-numeric" type="string">6</PROPERTY>
<PROPERTY name="media">FC(-)</PROPERTY>
<PROPERTY name="target-id">target-ID</PROPERTY>
<PROPERTY name="status">Disconnected</PROPERTY>
<PROPERTY name="status-numeric">6</PROPERTY>
<PROPERTY name="actual-speed"></PROPERTY>
<PROPERTY name="actual-speed-numeric">255</PROPERTY>

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