Skip to end of metadata
Go to start of metadata

In this section:

 

A CLI command is composed of the following elements:

 <operation> <object> <keyword> <parameter1> <attribute/argument> <parameter2> <attribute/argument>

 Where:

<operation> is the operation to be performed.

<container> represents an interior data node in the data tree. A container has no value, but rather a set of child nodes that can be containers, lists, or leafs.

<list> represents an interior data node in the data tree. The <list> statement takes one or more keys depending on the list definition. A list entry contains a set of child nodes that can be containers, lists, or leafs.

<key> is a space-separated list of identifiers that uniquely identify an entry in a list. One or more (*m) key statements may be used.

<leaf> represents an exterior or final data node in the data tree. A leaf is a configuration parameter that that can be set to a value.

<value> represents the leaf's value.

As an example, to enable a SIP trunk group named "STG-1" in the zone named "defaultSigZone" for the default address context, the following command applies (refer to Figure 1):

 

% set addressContext default zone defaultSigZone sipTrunkGroup STG-1 state enabled

Figure : CLI Command Line Structure

Uppercase and Lowercase Usage

CLI commands are case-sensitive and must be entered exactly as shown in this guide. Objects and profiles with names that differ only in case are considered distinct objects.

For example, the following trunk groups are three distinct trunk group entities: trunkgroup1, TRUNKGROUP1, TrunkGroup1. It is strongly recommended to avoid such naming conventions, and to also adopt a standard naming convention when initially defining your configuration.

As a best practice, always use UPPERCASE for trunk group names.

Space-Completion Functionality

The CLI includes space-completion behavior which automatically displays a list of possible arguments when the user types more than one space after a keyword or parameter (same action as pressing Tab). This default setting is generally desired behavior when entering commands from an interactive session (complete-on-space is set to "true").
The commands to turn on/off space-completion are:

> set complete-on-space true
> set complete-on-space false

Here is an example of entering "show" command plus two spaces when space-completion is set to "true". The result is a "Possible completions" list that automatically displays as shown:

admin@sbx131> show..
Possible completions:
cli - Display cli settings
configuration - Display current configuration
notification - Display notifications
status - Display current system status
table - Display current configuration and status as a table
users - Display currently logged on users
utils - System utilities

On the other hand, when copy-pasting multiple commands to the command line this feature is not desirable. Extra spaces may prevent the commands from running as expected due to the automatic space-completion feature. To avoid this, turn this feature off using the following command:

admin@sbx131> set complete-on-space false
[ok][2012-07-03 14:13:47]

 


 

  • No labels