HP MSA2324sa HP StorageWorks 2300 Family Modular Smart Array CLI reference gui - Page 14
Scripting guidelines, XML API examples, XML API DTD content
![]() |
View all HP MSA2324sa manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 14 highlights
Table 3 XML API elements (continued) Element Description and attributes 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. • 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. • key. Indicates whether this property is a key value to identify this object. • display-name. The label for this data to show in user interfaces. COMP ASC 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. The association element provides a simple association description between two objects in the response. • A. First object. • B. Second object. Scripting guidelines 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. 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: Success 0 Command completed successfully. 0 XML API examples This section provides example output from the XML API. The XML API is available through the CLI interface, which can be accessed via Telnet or SSH. The command input is in standard CLI format as defined in this guide. The output is in XML which conforms to the DTD described in XML API DTD content. 14 Using the CLI
![](/manual_guide/products/hewlettpackard-msa2312i-hp-storageworks-2300-family-modular-smart-array-cli-reference-guide-500912002-2010-2bf014b/14.png)