Skip to main content
SANtricity commands

Structure of a script command

Contributors netapp-driley

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

controller

a or b

drive

For enclosures with drawers, use tray ID, drawer ID, and slot ID. Alternatively, just tray ID and slot ID.

replacementDrive

For enclosures with drawers, use tray ID, drawer ID, and slot ID. Alternatively, just tray ID and slot ID.

driveChannel

Drive channel identifier

host

User label

hostChannel

Host channel identifier

hostGroup

User label

hostPort

User label

iscsiInitiator

User label or iSCSI Qualified Name (IQN)

iscsiTarget

User label or IQN

storageArray

Not applicable

tray

Tray ID

volume

Volume user label or volume World Wide Identifier (WWID) (set command only)

volumeCopy

Target volume user label and, optionally, the source volume user label

volumeGroup

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).