Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell PowerVault ME5 Series Storage System CLI Reference Guide

PDF

Scripting guidelines

When scripting command input, use CLI syntax as defined in this guide. For use with SSH or Telnet, use a space character between command names, parameters, and their values (as shown throughout this guide). For use with the HTTP or HTTPS 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.

CAUTION:Because API format does not use confirmation prompts, use caution when scripting commands that may cause data unavailability or data loss.

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 API status object, using the ipa output option:
OBJECT basetype="status" name="status" oid="1"
<PROPERTY name="response-type" type="string">Success</PROPERTY>
<PROPERTY name="response-type-numeric" type="uint32">0</PROPERTY>
<PROPERTY name="response" type="string">Command completed successfully. (2020-01-29
 10:58:27)</PROPERTY>
<PROPERTY name="return-code" type="sint32">0</PROPERTY>
<PROPERTY name="component-id" type="string"></PROPERTY>
<PROPERTY name="time-stamp" type="string">2020-01-29 10:58:27</PROPERTY>
<PROPERTY name="time-stamp-numeric" type="uint32">1580295507</PROPERTY>
</OBJECT>

The following example shows the API status object, using the json output option:

"status":[
{
"object-name":"status",
"meta":"/meta/status",
 "response-type":"Success",
 "response-type-numeric":0,
"response":"Command completed successfully. (2020-01-29 11:01:10)", "return-code":0,
"component-id":"",
"time-stamp":"2020-01-29 11:01:10",
"time-stamp-numeric":1580295670
}
]

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 may be:

  • 0: The command completed successfully.
  • -1000 to -1999: The command completed with a warning.
  • Any other value: The command failed.
NOTE:If you script an operation to repeatedly add and remove disk groups, set a delay of at least two minutes between deleting a disk group and creating the next one.

Example command input and API output

The following example shows a command formatted for use with the command-line interface, the same command formatted for use with the HTTPS interface, and command output in the XML and JSON APIs.

  • Command-line interface format: create user JSmith interfaces wbi password Abc#1379

  • HTTPS interface format: create/user/JSmith/interfaces/wbi/password/Abc#1379

  • XML API output:

    <xml version="1.0" encoding="UTF-8" standalone="yes">
    <RESPONSE VERSION="L100" REQUEST="create user JSmith interfaces wbi password
    Abc#1379">
      <OBJECT basetype="status" name="status" oid="1">
        <PROPERTY name="response-type" type="string">Success</PROPERTY>
        <PROPERTY name="response-type-numeric" type="uint32">0</PROPERTY>
        <PROPERTY name="response" type="string">Command completed successfully. (JSmith) -
    The new user was created. (2020-01-29 11:08:59)
        <PROPERTY name="return-code" type="sint32">0</PROPERTY>
        <PROPERTY name="component-id" type="string">JSmith</PROPERTY>
        <PROPERTY name="time-stamp" type="string">2020-01-29 11:08:59</PROPERTY>
        <PROPERTY name="time-stamp-numeric" type="uint32">1580296139</PROPERTY>
      </OBJECT>
    </RESPONSE>
  • JSON API output:

    {
    "status":[
    {
    "object-name":"status", 
    "meta":"/meta/status",
    "response-type":"Success", 
    "response-type-numeric":0,
    "response":"Command completed successfully. (JSmith) - The new user was created. 
    (2020-01-29 11:05:40)",
    "return-code":0,
     "component-id":"JSmith",
    "time-stamp":"2020-01-29 11:05:40",
    "time-stamp-numeric":1580295940
    }
    ]
    }

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\