20
Using the CLI
The output of
show
commands is intended for monitoring or obtaining the current configuration. Other
commands provide configuration data and display one or more status objects that specify the status of
command processing. The last status object specifies the overall status of the command; other status
objects indicate intermediate processing status.
The following example shows the XML API status object:
<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.</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"></PROPERTY>
<PROPERTY name="time-stamp" type="string" size="25" draw="false"
sort="datetime" display-name="Time">2010-08-10 11:32:29</PROPERTY>
<PROPERTY name="time-stamp-numeric" type="uint32" size="25" draw="false"
sort="datetime" display-name="Time">1281439949</PROPERTY>
</OBJECT>
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>
Содержание P2000 G3
Страница 1: ...HP P2000 G3 MSA System CLI Reference Guide Part number 500912 009 First edition February 2014 ...
Страница 14: ...14 About this guide ...
Страница 30: ...30 Categorical list of commands ...
Страница 96: ...96 Alphabetical list of commands exit Description Log off and exit the CLI session Syntax exit ...
Страница 159: ...HP P2000 G3 MSA System CLI Reference Guide 159 See also set host parameters show iscsi parameters ...
Страница 199: ...HP P2000 G3 MSA System CLI Reference Guide 199 See also set cache parameters show volumes ...
Страница 217: ...HP P2000 G3 MSA System CLI Reference Guide 217 Basetypes drives enclosure list status See also show vdisks ...
Страница 223: ...HP P2000 G3 MSA System CLI Reference Guide 223 Basetypes email parameters status See also set email parameters ...
Страница 230: ...230 Alphabetical list of commands See also clear events set snmp parameters show snmp parameters ...
Страница 288: ...288 Alphabetical list of commands Basetypes snapshots status See also show master volumes show snap pools ...
Страница 292: ...292 Alphabetical list of commands Basetypes system unhealthy component status See also set system ...
Страница 294: ...294 Alphabetical list of commands See also set volume set vdisk ...
Страница 338: ...338 Alphabetical list of commands Basetypes remote links See also show remote systems verify remote link ...
Страница 340: ...340 Alphabetical list of commands Basetypes remote links See also show remote systems verify links ...
Страница 424: ...424 XML API basetype properties PROPERTY name utility priority numeric type string 0 PROPERTY OBJECT ...
Страница 469: ...HP P2000 G3 MSA System CLI Reference Guide 469 PROPERTY name status type string OK PROPERTY OBJECT ...
Страница 494: ...494 XML API basetype properties PROPERTY name sample time numeric type string 1329397200 PROPERTY OBJECT ...
Страница 498: ...498 XML API basetype properties PROPERTY name mrc version type uint8 0 PROPERTY OBJECT ...
Страница 510: ...510 XML API basetype properties PROPERTY name reserve type numeric type string 0 PROPERTY OBJECT ...
Страница 524: ...524 Glossary ...
Страница 532: ...532 Index ...