Argument Lists; Assignments (Variables); Branches - HP 418800-B21 - StorageWorks Modular Smart Array 70 Storage Enclosure User Manual

Hp storageworks replication solutions manager 4.0.1 user guide (t3680-96308, june 2008)
Hide thumbs Also See for 418800-B21 - StorageWorks Modular Smart Array 70 Storage Enclosure:
Table of Contents

Advertisement

Argument lists

In some commands an argument list can be specified. An argument list consists of individual resource
names, separated by commas, and enclosed in parenthesis.
For example, a list of storage volumes (virtual disks):
("\\Array2\Cats", "\\Array2\Dogs", "\\Array3\Cars")

Assignments (variables)

The Editing Task window allows you to create assignments (variables) that refer to specific resources or
that reference the results of a command.
In the following example, a lengthy UNC-formatted name is stored in a variable on line 5. When the job
is run, a snapclone is created by the command on line 10, which refers to the variable.
Line Task
...
5
$disk = SetVariable ("\\ArrayA2\Pets\Cats\Vdisk66")
...
10
SnapcloneStorageVolume ($disk, "", SAME, "", WAIT)
...
In the next example, the results of a command are saved in a variable when the job is run. On line 7, the
UNC name of the snapshot is stored in the variable $Rep1. Then on line 13 the variable is referenced
to delete the snapshot.
Line Task
...
$Rep1 = SnapshotHostVolume ("\\source_host\path\source_hostvol1", FULLY_ALLOCATED, SAME)
7
ONERROR PAUSEAT E1:
...
//
13
E2: DeleteStorageVolumes ( $Rep1 ) ONERROR PAUSEATE2:
...
Usage
Assignments are:
Local to each job and cannot be referenced across jobs.
Not case sensitive.
Format
The first two characters must be a dollar sign ($) followed by an alpha character. No special
characters are allowed after the first character.
Upper and lower case, alpha and numeric are allowed.
Underscores are allowed; spaces are not allowed.

Branches

Branches and labels are typically used to handle errors and to create jobs that can be looped repeatedly.
In line 9 of the following example, the command branches to label E1 on line 30 if there is an error
when the command is executed.
186
Jobs

Advertisement

Table of Contents
loading

Table of Contents