beautypg.com

General cli control commands, Allowexecerrors and disallowexecerrors commands, Goto command – HP SAN Virtualization Services Platform User Manual

Page 24: 24 goto command

background image

General CLI control commands

AllowExecErrors

and DisallowExecErrors commands

Syntax

AllowExecErrors

DisallowExecErrors

Description

The AllowExecErrors (allow or ignore execution errors) and DisallowExecErrors (do not
allow or do not ignore execution errors) CLI commands can only be used in script files (that is, when
the -I argument is used).

The AllowExecErrors CLI command is used to ignore errors during the execution of CLI commands.
Its main purpose is to ignore does not exist types of errors, which are returned when trying to delete
an object (virtual disk, PiT, or snapshot) that does not exist. The effect is that the ignored errors are
not reported back to the application that invoked the VSM CLI.

The DisallowExecErrors CLI command is used to reset the state to do not allow or do not ignore
execution errors
, which is the default/initial state of CLI execution.

NOTE:

The AllowExecErrors command suspends any OnErrorGoTo command that is in effect until the
next DisallowExecErrors command (if any).

GoTo

command

Syntax

GoTo Label

Description

The GoTo command can be only used in script files (that is, when the -I argument is used). This
command is used to change the sequence of executed CLI commands.

This command instructs the CLI executor to go to Label. Note that the line with the label in the script
file must always come after the line of the GoTo command. Label is not case sensitive, and must not
contain white spaces. The label location must appear at the beginning of a line immediately followed
by a colon (:).

A GoTo command without a label is simply ignored, but it still clears any previous label set by an
OnErrorGoTo

command.

A GoTo command (even if empty or without a label) clears any previous label set by an OnErr-
orGoTo

command (that is, after the GoTo command is executed, no previous OnErrorGoTo

command is in effect).

To exit the script file, put the label at the end of the script file (as the last line), or do not add the
label at all (but this may cause confusion about the original intention of the script writer). A best
practice would be to have the last line of a script always contain and terminating label of some

Using the VSM command line interface

24