HP 418800-B21 HP StorageWorks Replication Solutions Manager 4.0.1 user guide ( - Page 186
Argument lists, Assignments variables, Branches
UPC - 882780564640
View all HP 418800-B21 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 186 highlights
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 ... 7 $Rep1 = SnapshotHostVolume ("\\source_host\path\source_hostvol1", FULLY_ALLOCATED, SAME) 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