User Interface

The User Interface section consists of the following subsections:

Accessing the VTL CLI

You should run Secure Shell (SSH) software on a server or desktop computer and use it to access the VTL.

The VTL supports two methods of issuing commands through the CLI: by issuing commands from the interactive command line after logging in or by issuing a command directly from the SSH command line.

With the first method of issuing commands, you begin by entering only your user name and the IP or host name of the VTL. The system prompts you for your password and then displays the default prompt, at which you enter commands. The following text shows the correct format and an example:

[host prompt] $ ssh user_name@IP_address_or_host_name
[host prompt] $ ssh admin@10.72.185.22 
admin@10.72.185.22's password:*****
NearStore VTL CLI
User admin logged in.
VTL>

The second method of issuing commands allows you to enter a command along with your user name and IP address or host name. The system prompts you for your password and then immediately executes the command, bypassing the default prompt. The following text shows the correct format for this method and an example:

[host prompt] $ ssh user_name@IP_address_or_host_name command   
[host prompt] $ ssh admin@10.72.185.22 network show
admin@10.72.185.22's password:
Network Configuration:-
                                 Host Name: VTL_deux22
                                IP Address: 10.72.185.22
                                   Netmask: 255.255.255.0
                           Gateway Address: 10.72.185.1
                        Primary DNS Server: 10.72.185.45
                      Secondary DNS Server: 10.54.134.25
[host prompt] $  echo $?
0

The 0 in the last line of the preceding text indicates that the command executed successfully.

Note

The VTL CLI returns proper exit values on execution of a command:

  • 0– Command success

  • 1– Command syntax error

  • 2– Command execution error

The following text shows an example of a login command that contains a command syntax error and the returned error message:

[host prompt] $ ssh admin@10.72.185.22 vlib export
admin@10.72.185.22's password:*****
Error: Insufficient Parameters
Export a Volume from a Virtual Library.
Usage: vlib export vtape_id
[host prompt] $ echo $?
1

The following text shows an example of a login command that contains an execution error and the returned error message:

[host prompt] $ ssh admin@10.72.185.22 customer remove admin
admin@10.72.185.22's password:*****
Error: Customer option is not enabled.
[host prompt] $ echo $?
2

Logging Out of the VTL CLI

To log out of the CLI session, enter exit or quit at the prompt:

VTL> exit

Note

The login credentials used in an SSH session to the VTL expire after one hour of inactivity. Although the SSH connection might still be active, you need to open a new SSH session to revalidate the credentials and log in again to the VTL.

VTL Command Structure

The VTL command structure section consists of the following subsections:

Command Prompt

The VTL CLI provides a default prompt:

VTL>

Command Naming

Users control the VTL by treating it as a group of objects and the services that the objects provide. Each of these objects and services has a unique name, as follows:

  • Objects: ptape, customer, host, ldisk, vtdt, vlib, vtape, vlt, pdisk, and so on

  • Services: add, remove, list, set, get, load, unload, export, and so on

Command Syntax

Commands take the following format:

VTL> object service argument(s)

Arguments can be in positional parameter format or in named format. These formats are discussed next.

Command Usage

The Command Usage section consists of the following subsections:

Positional and Named Parameters

The VTL CLI supports arguments in positional parameter format and named parameter format. Most of the arguments shown in this guide are in positional parameter format.

The following shows an argument in positional parameter format:

param_value

The following shows an argument in named parameter format:

param_name=param_value

The following text displays two examples of correct command syntax. The first shows arguments in positional parameter format and the second shows arguments in named parameter format.

VTL> customer add name email
VTL> snmp set station=station_ip community=community version=version

Any positional parameter can be named, as shown:

VTL> raid remove raid_name
VTL> raid remove name=disk_name

Combinations of positional and named parameters also are allowed, as shown:

VTL> snmp set station_ip community=community version=version  
VTL> snmp set station_ip community version=version

In the case of named parameters, the order of the parameters does not matter, as shown:

VTL> snmp set station=station_ip community=community version=version 
VTL> snmp set community=community version=version station=station_ip

Command Navigation

The CLI command history to enable the user to navigate through the previous commands:

VTL> display history

Object Identification

All operations support UUID-based and name-based formats for the identification of a requisite object, as shown:

VTL> customer remove customer_uuid
VTL> customer remove customer_name  

Automatic Completion

The VTL CLI supports automatic completion of commands, subcommands, and parameters.

To display a list of all commands in columns, press Tab at the command prompt:

VTL> 
access        admin         customer      dmesg         host
acs           appliance     debug         email         hotspare 
acsls         asup          diag          eventlog      iereq 
action        config        display       help          license ...

To display a list of commands beginning with the letter v, type v and press Tab at the command prompt:

VTL> v  
vdrive  vlib    vtape   vtdt

To display a list of subcommands for a command, type a command and press Tab at the command prompt:

VTL> vtape 
add     help    list    load    lookup  move    remove    unload  update

To display a list of arguments for a command, enter the command and subcommand and press Tab at the command prompt:

VTL> vtape update  
enable_disk_compression   enable_tape_smart_sizing   export_needed ...

Syntax Constraints

Named parameters always follow positional parameters; the VTL ignores any unnamed parameters that follow named parameters.

The following examples show incorrect commands:

VTL> snmp set station=station_ip community version
VTL> snmp set station_ip community=community version
VTL> snmp set station=station_ip community=community version

The following examples show correct commands:

VTL> snmp set station_ip community version
VTL> snmp set station_ip community version=version
VTL> snmp set station_ip community=community version=version
VTL> snmp set station=station_ip com=community version=version

Parameters containing spaces must be within quotes, as shown:

VLT> sp add name description="Default Storage Pool"

The following Boolean parameters are valid:

  • true or false

  • yes or no

  • enable or disable

The case is not relevant, and any substring also is valid.

If the user enters only the name of a Boolean parameter, the system takes its value as true.

VTL> options set customer=1
VTL> options set customer=y
VTL> options set customer=NO

Command Help Structure

The Help system is designed to guide users in selecting a command to perform the desired task. For example, to view a list of possible arguments for a given command, type the command name, a space, and a question mark, and press Enter. The help system lists a set of keywords associated with the command or displays a short description of the applicable arguments. Commands without parameters display usage information.

Table 1.1. 

Command Description
help
Lists all available commands.
help customer
Lists all the services provided by customer object.
help customer add
Displays a short description of command and parameters.
customer
Lists all the services provided by customer object.
customer <help>
Lists all the services provided by customer object.
customer add
Displays a short description of command and parameters.

Copyright © 1994-2006, Network Appliance, Inc. All rights reserved.
Part number 210-03617_A0
Comments