Structure of a script command
To ensure successful execution, script commands must be written in the proper structure.
All script commands have the following structure:
*command operand-data* (*statement-data*)
-
command
identifies the action to be performed. -
operand-data
represents the objects associated with a storage array that you want to configure or manage. -
statement-data
provides the information needed to perform the command.
The syntax for operand-data
has the following structure:
(*object-type* | all *object-types* | [*qualifier*] (*object-type* [*identifier*] (*object-type* [*identifier*] | *object-types* [*identifier-list*])))
An object can be identified in four ways:
-
Object type — Use when the command is not referencing a specific object.
-
all
parameter prefix — Use when the command is referencing all of the objects of the specified type in the storage array (for example,allVolumes
). -
Square brackets — Use when performing a command on a specific object to identify the object (for example,
volume [engineering]
). -
A list of identifiers — Use to specify a subset of objects. Enclose the object identifiers in square brackets (for example,
volumes [sales engineering marketing]
).
A qualifier is required if you want to include additional information to describe the objects.
The object type and the identifiers that are associated with each object type are listed in this table.
Object Type | Identifier |
---|---|
|
a or b |
|
For enclosures with drawers, use tray ID, drawer ID, and slot ID. Alternatively, just tray ID and slot ID. |
|
For enclosures with drawers, use tray ID, drawer ID, and slot ID. Alternatively, just tray ID and slot ID. |
|
Drive channel identifier |
|
User label |
|
Host channel identifier |
|
User label |
|
User label |
|
User label or iSCSI Qualified Name (IQN) |
|
User label or IQN |
|
Not applicable |
|
Tray ID |
|
Volume user label or volume World Wide Identifier (WWID) ( |
|
Target volume user label and, optionally, the source volume user label |
|
User label Valid characters are alphanumeric, a hyphen, and an underscore. |
Statement data is in the form of:
-
Parameter = value (such as
raidLevel=5
) -
Parameter-name (such as
batteryInstallDate
) -
Operation-name (such as
redundancyCheck
)
A user-defined entry (such as user label) is called a variable. In the syntax, it is shown in italic (such as trayID
or volumeGroupName
).