Options, Properties, Command batching – HP Virtual Connect 1.10Gb-F Ethernet Module for c-Class BladeSystem User Manual

Page 7

Advertising
background image

Introduction 7

Some commands require that a parameter be specified, for example, the add user command. The

required parameter is the user name (add user jake), and if the username is not provided, an error

message displays indicating that a required parameter is missing.

Options

Options enable users to control certain behavior characteristics available during the command execution.
Some examples of options include controlling output format and specifying a quiet mode for

suppressing interactive prompts that would normally require input from the user.
Options are distinguished from other command line elements by using a hyphen (-) in front of the option.
Option arguments are required or optional depending on the option being specified. For example, the -

output option requires an argument, which is a list of one or more output format attributes. However,

the -quiet option does not require any arguments to be specified.
The general format of a CLI option is as follows:

-<option>[=argument1>,<argument2>, . . .]

Example: ->show user suzi -output=script1
In the example, -output is the option, and script1 is an option argument.

Properties

Properties are specific configuration attributes of a managed element. Properties are commonly used
during set operations or add operations where a managed element is being modified or created. In

some limited circumstances, properties might also be used as a part of a show or other command.

IMPORTANT:

If a property value contains embedded spaces, then the entire property value

must be contained within single or double quotes. Likewise, if a double quote is part of a

property value, it should be contained within single quotes, and if a single quote is part of a

property value, it should be contained within double quotes.

Command batching

In previous versions of the CLI, the user had the following options to enable different CLI command
invocations:

Interactively input commands at the shell after logging in via SSH. This method works well for
interactive users, but not necessarily for automation. Although users could write expect scripts for

command processing, the solution is not optimal.

Enter remote shell script commands, one-at-a-time, using a remote SSH client. This method enhances
automation, but performance is lessened because each command requires logging in and logging

out of the remote SSH server in the firmware. Because the authentication and command processing is

performed over an encrypted channel, users experience a performance hit. If the user script is
performing many operations in the client script, the time necessary to perform the tasks increases.

The updated version of the CLI supports a new enhancement that enables users to enter multiple CLI

commands in a single command-line invocation. This capability is useful in situations where users prefer to

batch several commands together and execute them in a particular sequence, within the context of the

same user login SSH session. This method improves the overall performance of lengthy script processing.
Example 1: Sample commands with no command batching

Advertising