[go: up one dir, main page]

0% found this document useful (0 votes)
206 views32 pages

Introduction To MCRNC SCLI Commands

Uploaded by

Erick Marin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
206 views32 pages

Introduction To MCRNC SCLI Commands

Uploaded by

Erick Marin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Introduction to mcRNC SCLI Commands

DN09224125
Issue 01B
Approved on 2019/12/02

WCDMA RAN mcRNC, FP23R3

Operating Documentation, Issue 01

© 2023 Nokia. Nokia Condential Information. Use subject to agreed restrictions on disclosure and use.
Nokia is committed to diversity and inclusion. We are continuously reviewing our customer
documentation and consulting with standards bodies to ensure that terminology is inclusive
and aligned with the industry. Our future customer documentation will be updated
accordingly.

This document includes Nokia proprietary and condential information, which may not be
distributed or disclosed to any third parties without the prior written consent of Nokia. This
document is intended for use by Nokia’s customers (“You”/”Your”) in connection with a
product purchased or licensed from any company within Nokia Group of Companies. Use this
document as agreed. You agree to notify Nokia of any errors you may nd in this document;
however, should you elect to use this document for any purpose(s) for which it is not
intended, You understand and warrant that any determinations You may make or actions
You may take will be based upon Your independent judgment and analysis of the content of
this document.

Nokia reserves the right to make changes to this document without notice. At all times, the
controlling version is the one available on Nokia’s site.

No part of this document may be modied.

NO WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
ANY WARRANTY OF AVAILABILITY, ACCURACY, RELIABILITY, TITLE, NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, IS MADE IN RELATION TO THE
CONTENT OF THIS DOCUMENT. IN NO EVENT WILL NOKIA BE LIABLE FOR ANY DAMAGES,
INCLUDING BUT NOT LIMITED TO SPECIAL, DIRECT, INDIRECT, INCIDENTAL OR
CONSEQUENTIAL OR ANY LOSSES, SUCH AS BUT NOT LIMITED TO LOSS OF PROFIT,
REVENUE, BUSINESS INTERRUPTION, BUSINESS OPPORTUNITY OR DATA THAT MAY ARISE
FROM THE USE OF THIS DOCUMENT OR THE INFORMATION IN IT, EVEN IN THE CASE OF
ERRORS IN OR OMISSIONS FROM THIS DOCUMENT OR ITS CONTENT.

Copyright and trademark: Nokia is a registered trademark of Nokia Corporation. Other


product names mentioned in this document may be trademarks of their respective owners.

© 2023 Nokia.

2 © 2023 Nokia. Nokia confidential


Table of Contents

Summary of changes .................................................................................................................... 5

1 Introduction to the structured command line interface (SCLI) ............................................ 6


1.1 SCLI access ......................................................................................................................... 6
1.1.1 Generic shell access (bash) ................................................................................... 6
1.1.1.1 Limited bash shell ....................................................................................... 7
1.1.1.2 Full bash shell .............................................................................................. 7
1.1.2 SCLI shell access from bash ................................................................................. 9
1.1.3 Session on peer node ........................................................................................... 9
1.2 SCLI command basics .................................................................................................... 10
1.2.1 Top-level SCLI commands ................................................................................. 10
1.2.2 SCLI command syntax ........................................................................................ 13
1.2.3 SCLI command tree ............................................................................................. 13
1.2.4 SCLI command notation ..................................................................................... 14
1.2.5 SCLI help ............................................................................................................... 14
1.2.6 SCLI permissions ................................................................................................. 15
1.2.7 SCLI auditing ........................................................................................................ 15
1.3 Command execution ...................................................................................................... 16
1.3.1 SCLI command execution ................................................................................... 16
1.3.2 SCLI command autocompletion ........................................................................ 17
1.3.3 SCLI command wildcard ..................................................................................... 17
1.3.4 SCLI command parameter values ..................................................................... 18
1.3.5 SCLI command special characters .................................................................... 20
1.3.6 SCLI command confirmation prompt ............................................................... 22
1.3.7 SCLI batch file ...................................................................................................... 22
1.3.8 SCLI history access .............................................................................................. 23
1.4 SCLI output ...................................................................................................................... 23
1.4.1 SCLI command output ........................................................................................ 23
1.4.2 SCLI pager ............................................................................................................. 24
1.4.3 Configuration of SCLI output and error destination ..................................... 24
1.5 SCLI framework management ...................................................................................... 25
1.5.1 SCLI supported variables ................................................................................... 25
1.5.2 SCLI built-in commands ..................................................................................... 26
1.5.3 SCLI built-in environment variables ................................................................. 29

2 Glossary ....................................................................................................................................... 32

© 2023 Nokia. Nokia confidential 3


List of Tables
Table 1 Top-level SCLI commands .......................................................................................... 11
Table 2 Notation of mandatory and optional SCLI parameters ......................................... 14
Table 3 History commands ....................................................................................................... 23
Table 4 Set of read-only variables ........................................................................................... 25
Table 5 Commands for manipulating files ............................................................................. 27
Table 6 List of built-in environment variables ....................................................................... 30

4 © 2023 Nokia. Nokia confidential


Summary of changes

Changes between document issues are cumulative. Therefore, the latest document issue
contains all changes made to previous issues.

Changes between issues 01 A(2018-01-26, WCDMA18) and 01B (2019-12-02,


WCDMA18)
Edit-reviewed the document.

Updated short description of the topic SCLI shell access from bash.

Updated the commands for audit trail entries in the topic SCLI auditing.

Changes between issues 01 (2017-10-13, WCDMA18) and 01A (2018-01-26,


WCDMA18)
Changed all instances of vNE to NE.

Removed _nokrcpautoremoteuser.

Changed all instances of /opt/nokia/etc/readme_root.txt to


/opt/nsn/etc/readme_root.txt.

Added information on executing SCLI commands in Session on peer node

Added information on SCLI sessions in Session on peer node

Changed RCP Security Guidelines to Security in SCLI permissions

© 2023 Nokia. Nokia confidential 5


1. Introduction to the structured command line interface
(SCLI)

The structured command line interface (SCLI) provides interactive and menu-based access for
viewing and managing the configuration and state of the network element (NE).

Context-sensitive help and auto-completion of commands guide you through in the execution of
commands.

The actions of users in the SCLI shell are written to audit logs. Log entries are created when
commands are executed. These log entries include information about the user, the command
executed, and the execution time and status (success or failure).

The SCLI shell is the preferred, the secure management shell for managing, monitoring, and
troubleshooting the NE. It is the default login shell for all user accounts except root,
and_nokfsoperator.

1.1 SCLI access

You can access SCLI upon login. The SCLI shell is the default login shell for all user accounts
except for root and _nokfsoperator.

To enter the SCLI management shell, you must have at least the fsclishSessionAllow
permission.

Note:
The set user username command is used to switch to any user account.

1.1.1 Generic shell access (bash)

The system provides limited bash and full bash shell access options.

You should use the SCLI as it is a fully-functional and secure command-line based management
interface that does not require any direct access to an insecure environment, like the bash shell.

6 © 2023 Nokia. Nokia confidential


1.1.1.1 Limited bash shell

The main purpose of the limited shell is to have the flexibility of the standard Linux/Unix when
accessing various management related files, like log files.

The limited shell provides a set of very basic commands. Some of the supported commands are:
bzip2, cat, cp, df, grep, gzip, head, less, ls, more, rm, sed, tail, and tar.

You can access this shell through SCLI if your user account belongs to the
_nokfsuilimitedbash group. To access the shell, use the following commands:

shell
shell bash limited

Limited bash runs in a secure chroot environment. In the chroot environment only directories
required for managing and troubleshooting the system are visible.

Note:
The /readme.txt file in the limited bash shell contains information about the available
directories in the chroot environment as well as information about the secondary groups
that you must be a member to have access to particular directory.

1.1.1.2 Full bash shell

The full bash shell provides a wide variety of commands. This shell access is limited to users with
fsclishFullBashSessionAllow or fsclishAllowAll permission.

You can access the full bash shell using the shell bash full command.

© 2023 Nokia. Nokia confidential 7


Note:
Only advanced users with a profound understanding of the behavior of the NE should use
the commands of the full bash. When authorized users enter the full bash environment,
they are prompted for confirmation and warned with the following message:

********************************** WARNING **********************************

Nokia advises that only advanced users with a profound understanding of the

Network Element (NE) behaviour use the full bash commands, and if so, then

only as instructed in the customer documentation. Only a subset of the

commands available via the full bash shell are officially supported by Nokia

and many full bash commands can be misused either accidentally or

intentionally, to cause, for example, a significant performance decrease

(a drop of 0-100%) in networking (throughput and latencies), storage I/O

or processing capacity. In the worst case, this may cause, for example,

automatic recovery actions. Security measures, such as authorization checks

for commands executed by root or non-root users, or audit logs for the

commands are not applied in the full bash shell. Also, some of the typical

Linux commands have been intentionally modified to work differently than in

off-the-shelf Linux distributions. You can control access to the full bash

shell by assigning or removing the permission fsclishShell or

fsclishFullBashSessionAllow from/to the management user account. Refer to

customer documentation for the instructions for user permission management.

Read /opt/nsn/etc/readme_root.txt for more details.

********************************** WARNING **********************************

Are you sure you want to proceed? [y/N]:

8 © 2023 Nokia. Nokia confidential


1.1.2 SCLI shell access from bash

You can access SCLI upon login. The SCLI shell is the default login shell for all user accounts
except for root and _nokfsoperator. You can also access SCLI shell from the bash shell if you are
initially logged in to bash shell.

To enter the SCLI shell, you must have at least the fsclishSessionAllow permission unless
you have logged in as the root user and are using the fsclish command to access the SCLI
shell.

Note:
Access to the system with bash as a login shell is limited only to users who really need it.
Thus, when you access the bash as the login shell, you are prompted for confirmation and
warned with the following message:

USAGE OF THE ROOT ACCOUNT AND THE FULL BASH IS RECOMMENDED

ONLY FOR LIMITED USE. PLEASE USE A NON-ROOT ACCOUNT AND THE

SCLI SHELL (fsclish) AND/OR LIMITED BASH SHELL.

Read /opt/nsn/etc/readme_root.txt for more details.

1.1.3 Session on peer node

Start an SCLI session and execute SCLI commands on a peer node.

Example
To start a session on a peer node, run the shell scli peer command.

Apart from executing commands on the node where the user is logged in, starting an SCLI session
and executing SCLI commands on the peer node are also possible.

test@CLA-0 [TestCluster] > shell scli peer

Connecting to CLA-1,Please wait.

test@CLA-1 [TestCluster] >

© 2023 Nokia. Nokia confidential 9


Note:
The actual names of the management nodes vary per application. The term CLA node
refers to a management node that contains the operation and maintenance (O&M)
functions as well as the centralized cluster management functions. The users login to a
management node when starting an SCLI session. For example, names like CLA-0 and
CLA-1 are used for the management nodes.

Note:
Note that SCLI session on the peer node is applicable only on network elements that are
configured with dual cluster management nodes.

1.2 SCLI command basics

1.2.1 Top-level SCLI commands

The following table lists the top-level SCLI commands and their descriptions.

10 © 2023 Nokia. Nokia confidential


Table 1: Top-level SCLI commands

Command Description

add
This family of commands is used mainly to add configuration items.

cmdtree
This command has been deprecated. Use the help cmd-tree to view the
command syntax tree of SCLI commands.

commit
This family of commands is used to commit or finalize the changes done or
initiated by other commands. For example, committing of configuration
directory changes done by previous add, delete, and set commands.

copy This family of commands is used to copy a file from the source to its
destination. The source and destination can be either on two different
management nodes or on the same node.

delete
This family of commands is used mainly to delete configuration items.

exit
This command is used to terminate the current SCLI session.

Note:

The behavior of the exit command depends on the value of the


relative-mode built-in property. By default, this property is set to
off and the exit command terminates the current session. If the
relative-mode is set to on, the exit command moves one level up
from the current sub-level in the command tree.

generate This family of commands is used to generate passwords using the random
password generator.

help
This command is used to show the shell help.

history
This command is used to show the command history.

© 2023 Nokia. Nokia confidential 11


Command Description

load
This family of commands is used to load variables from a file into the
environment or session.

quit
This command is used to terminate the current SCLI session. The connection
is terminated automatically in case of a non-root user with the SCLI shell as a
default login shell.

refresh
This family of commands is used to refresh the SCLI command definitions
and statistics cache.

reset
This family of commands is used to reset the environmental variables.

restore
This family of commands is used to restore the general security-related data
and the configuration data from a backup configuration file.

rollback
This family of commands is used to roll back a Configuration Directory
transaction.

save
This family of commands is used to save current environment or session
variables to a file.
It is also used to save several types of data into the file system, such as
licenses, symptom-report, tracing, and so on.

set
This family of commands is used mainly to modify configuration items.

shell
This command is used to start another shell for an interactive command
execution.

show
This family of commands is used to view configuration items and other
information useful to operator.

start
This family of commands is used to start a command, but not necessarily
wait for the completion of an action initiated by the command.

12 © 2023 Nokia. Nokia confidential


Command Description

stop
This family of commands is used to stop an operation started using the
start command.

unset This family of commands is used to unset an environment or session


variable.

1.2.2 SCLI command syntax

The generic syntax of one command line is presented below.

<operation> <domain> <rest of command>

The <operation> is the type of operation performed by a particular sub-module of the system,
for example, set, or show.

The <domain> segment defines the target functional area, for example, networking,
symptom-report.

The <rest of command> is specific to each command.

1.2.3 SCLI command tree

SCLI commands are stored as a tree of commands.

To display the command syntax tree, enter the help cmd-tree command. Press Q to quit the
long text output after executing the command.

To display the command syntax tree of an SCLI command that belongs to a specific command
set, type the command after cmd-set. For example, type help cmd-tree cmd-set
/alarm to displays all branches of the command tree where alarm occurs as the second word,
such as show alarm, set alarm, add alarm, and so on. To display the command set up to
second level (maximum of two words), type the command after cmd-set and use / to separate
command words. For example, type help cmd-tree cmd-set /networking/vlan to
displays all branches of the command tree where networking occurs as the second word and

© 2023 Nokia. Nokia confidential 13


vlan as the third word, such as add networking vlan, delete networking vlan, and
so on..

1.2.4 SCLI command notation

The SCLI commands in this document follow a unified notation regarding the mandatory and
optional parameters.

Table 2: Notation of mandatory and optional SCLI parameters

Notation Description

parameter <value>
Mandatory parameter.

[parameter
<value>] Optional parameter. It can be omitted.

{parameter <value>
parameter <value> Parameters inside curly brackets can be entered in a free order.
}

parameter
<value|value> Symbol | is read as logical exclusive OR (XOR).

1.2.5 SCLI help

To display help for a particular command, type the command followed by a question mark (?).

Example
To display the help information for the show alarm command, type the following command:

show alarm?

This command shows alarm related data.

14 © 2023 Nokia. Nokia confidential


1.2.6 SCLI permissions

You need to have permissions to authorize your actions in the SCLI framework.

The user needs to have certain permissions in order to be able to run an SCLI command. For
more details regarding the required permissions to run the commands, see Permissions for
Management interfaces in Security document and SCLI commands.

In SCLI commands, each command description includes a reference to all the permissions
required to execute the specific command. That means that the user must have at least one of
the permissions to be able to execute the command.

In a runtime system, to view the permission to SCLI command mapping, enter the following
command:

show user-management permission include-operations scli

You can also enter the following command to show the required permission for executing a
specific SCLI command:

help cmd-tree command show-permissions yes <cmd>

1.2.7 SCLI auditing

The SCLI framework generates audit logs for each executed command.

For each executed command SCLI generates audit logs. These are categorized into four audit
modes.

write This mode includes actions that involve changing the system
configuration.

read This mode includes actions that involve reading normal system
configuration.

sensitive-read This mode includes actions that involve reading security-sensitive


system configuration,

© 2023 Nokia. Nokia confidential 15


other This mode includes all other actions that do not fall into the previous
three categories.

To view all the audit trail entries in the system, enter the following command:

show log audit-trail

[X] <ENTER> - press <ENTER> to execute the command

[OX] start-time - start time stamp to fetch audit trail log

[OX] stop-time - stop time stamp to fetch audit trail log

[OX] verbosity - verbosity level of the output (default: brief)

[OX] write-to-file - named full path of file to write logs (default: console)

[X] filter-by - additional filters for audit trail log

In SCLI commands, each command description includes a reference to the audit mode the
particular command uses when generating audit log entries, under Audit policy column.

1.3 Command execution

1.3.1 SCLI command execution

Follow these steps to execute a command.

Procedure
1 Login to the NE.

Use an account with appropriate permissions.

2 Type the command with all the parameters in the command line and press Enter.

Step example
show has view Enter

16 © 2023 Nokia. Nokia confidential


1.3.2 SCLI command autocompletion

If you are unsure of the exact command to execute, use the autocompletion feature of SCLI.

The SCLI command autocompletion displays the possible choices allowed for a command. To use
this feature, use Tab at any point while typing the command.

The meanings of the symbols displayed after pressing Tab are as follows:

[X] - The user is authorized to use the command or parameter.


[ ] - The user is not authorized to use the command.
[OX] - The user is authorized to use the optional parameter.
[O] - The user is not authorized to use the optional parameter.
[GX] - The user is authorized to use the one-of parameter.
[MX] - The user is authorized to use the mandatory parameter.

Example

addTab

[X] alarm - Adds alarm related data.

[X] config - Adds configuration data.

[X] directory - Adds a new directory.

[X] license - Installs the license(s) into the network element.

[X] log - Adds log.

[X] mgmt-service - Adds config of network management agents and local management

interfaces.

[X] networking - Adds a networking object.

[X] routing - Adds routing object.

[X] security - Adds security data.

[X] stats - Adds statistics-related configuration items.

[X] user-management - Adds user-management data.

1.3.3 SCLI command wildcard

The wildcard matching is used to search all the possible values of a parameter.

Use the asterisk (*) character as the wildcard to match any number of unknown characters. For

© 2023 Nokia. Nokia confidential 17


example:

show networking ether iface *

interfaces in default instance:

-------------------------------

internal (Ethernet interface)

VRF name(ID) : default (0)

owner : /CLA-0

MAC : fa:16:3e:b5:2b:af

MTU : 1500

admin state : up

IPv4 forwarding : no

IPv6 forwarding : no

....

The wildcard function does not work for all parameters by default. To check if a parameter is
supported by a wildcard, check its help text by typing a question mark (?). For example:

show networking ether iface?

The parameter "iface" specifies ether interface name.

This parameter supports the asterisk wildcard character (*).

1.3.4 SCLI command parameter values

The types of parameter values are described below.

1. Parameters that provide a list of allowed values for autocompletion


To display the list of possible values to choose as the parameter value, press Tab after the
parameter name. For example:

18 © 2023 Nokia. Nokia confidential


show alarm active filter-by severityTab

[X] <SEVERITY> - severity level

[X] 1 - Indeterminate

[X] 2 - Critical

[X] 3 - Major

[X] 4 - Minor

[X] 5 - Warning

[X] 6 - Cleared

In this example, the user is able to select from the list shown after the first line
(<SEVERITY> - severity level).
There are parameters that occur at a fixed position in a command. For example:

set cli outstreamTab

[X] file - file as the output stream

[X] <destination> - destination for the output stream

[X] null - null device (which is a special file that discards all the

data written to it) as the output stream

[X] std - STDOUT as the output stream

In this example, the <destination> refers to the fixed position destination


parameter. Then, null and std are the possible values of the destination parameter.
There is also a special case of fixed position parameters where multiple types of parameters
may occur at the same position. For example:

set config-mode Tab

[X] <config-mode-exclusive> - Configuration Lock mode on exclusively.

[X] exclusive - Acquires configuration lock for exclusive use in

this session.

[X] <config-mode-on> - Configuration Lock mode on

[X] on - Acquires the normal, non-exclusive configuration

lock.

[X] <mass-config> - Enters or exits the mass-config mode.

[X] mass-config - Acquires or releases the Mass Configuration Lock.

In this example, the multiple fixed position parameters displayed are config-mode-
exclusive, config-mode-on and mass-config. Then, exclusive, on or mass-
config are the possible values of the config-mode.
2. Parameters that do not provide a list of allowed values for autocompletion

© 2023 Nokia. Nokia confidential 19


When there is no list of possible values to display for a parameter, the following message is
displayed:

No values available for autocomplete

Note:
The message is displayed only if the command supports autocompletion for the
specific parameter.
For example:

show networking instance default address peer Tab

[X] <peer> - IP address of the peer interface [ ip-address/mask ]

No values available for autocomplete

In this example, there is no list of possible values for the peer parameter.

There are parameters for which the user must enter the appropriate parameter value. For
example:

set config-mode on lock-timeout Tab

[X] <lock-timeout> - idle-timeout value in minutes after which the lock is

automatically released (default 10 minutes)

set config-mode on lock-timeout 1

In this example, the user specified 1 minute as the lock-timeout value.

1.3.5 SCLI command special characters

Special characters are used to remove the special meaning of certain characters or words to the
shell during command execution.

20 © 2023 Nokia. Nokia confidential


Note:
Each command has different restrictions regarding its allowed parameter values. For
example, the command's parameter value must be an integer, string with specific set of
characters, and so on. Hence, special characters can only be used for commands that do
not restrict them.

The following are the acceptable special characters in SCLI. In the examples below, <sample-
command> indicates a random SCLI command and <sample-parameter> an equivalent
parameter of the command.

Non-quoted backslash ( \ ) is used as an escape character that preserves the literal value of the
next character that follows.
Examples:
To include a double quotation mark in the input, enter:

set <sample-command> <sample-parameter> \"Test1

Command executed successfully.

The value of the sample-parameter is set to "Test1.


To include a space in the input, enter:

set <sample-command> <sample-parameter> Test\ value

Command executed successfully.

The value of the sample-parameter is set to Test value.


To include a backslash in the input, enter:

set <sample-command> <sample-parameter> Test\\

Command executed successfully.

The value of the sample-parameter is set to Test\.


Double quotes ( " " ) are used to preserve the literal value of all characters within the quotes.
For example:

set <sample-command> <sample-parameter> "Test value"

Command executed successfully.

The value of the sample-parameter is set to Test value.


A double quote may be used within double quotes by preceding it with a backslash (\). For
example:

© 2023 Nokia. Nokia confidential 21


set <sample-command> <sample-parameter> "\"Test\" value"

Command executed successfully.

The value of the sample-parameter is set to "Test" value.

1.3.6 SCLI command confirmation prompt

SCLI command confirmation prompt refers to the message that appears when a system critical
command is executed.

Example

delete license unique-id G0700502

Are you sure you want to proceed? [Y/n]:

The option in capital letter is the default answer for the confirmation prompt message.

Press Y to proceed or N to discard the transaction.

1.3.7 SCLI batch file

The SCLI batch file mode is used to execute the sequence of commands given in a file.

To start a batch file, type the following command:

start cli batch-file <file>

Example

start cli batch-file /home/mytest1/batch.data

SUMMARY OF COMMANDS BATCH FILE EXECUTION:

Executed commands:20

Failed commands:0

22 © 2023 Nokia. Nokia confidential


1.3.8 SCLI history access

The SCLI maintains history in memory and updates the user account-specific history file when the
session is closed.

The following table shows the commands for manipulating history:

Table 3: History commands

Command Description

up arrow Shows commands from the list of previously entered commands one at
a time.

down arrow Browses towards the more recent commands in the list of entered
commands.

history Shows a list of the latest entered commands.

!! Executes the most recent entered command.

!nn Executes a specific command from the history list (for example, enter
!125 to execute command number 125 from the command history
list).

!-nn Executes the nnth previous command from the last one in the command
history (for example, enter !-3 to execute the third from the last
command from the command history list).

1.4 SCLI output

1.4.1 SCLI command output

When a command for displaying data (for example, show) is executed successfully, the requested
data is displayed.

However, if the requested data is not available, the command displays a message indicating that
there is no information to display or an empty table. It is also possible that in some cases the

© 2023 Nokia. Nokia confidential 23


output displays no information at all.

When a command other than the show command (for example, add, delete, set, start, and
so on) is executed successfully, the command output may or may not display a confirmation
message. If no message is displayed, it means the command has executed successfully. If the
command has failed, an error messaged is displayed.

1.4.2 SCLI pager

The pager provides the capability to print a specific number of rows as output at a time.

This feature is available when help and command outputs have more than one page of
information to display. Paging is enabled by default.

To configure the number of lines to be displayed per page, use the following command:

set cli built-in rows <number of rows>

The following options are available:

value -1 disables paging


value 0 uses the default value (height of the console)
an integer between 1 and 99 sets a specific number of rows that are printed before the --
More-- prompt

Press space to view the next page or press Enter to view the next row.

To exit the pager, press Q. In case the shell does not return to the command prompt, press
Ctrl+C to stop the execution of the command, or press Ctrl+C, Ctrl+Z to forcefully stop the
command execution.

1.4.3 Configuration of SCLI output and error destination

You can configure the SCLI output and error destination as described below.

To redirect the output of command execution to a file, execute this command:

set cli outstream file <outputfile>

To redirect the errors from command execution to a file, execute this command:

set cli errorstream file <outputfile>

24 © 2023 Nokia. Nokia confidential


To restore the command output to console, execute this command:

set cli outstream std

To restore the error output to console, execute this command:

set cli errorstream std

Note:
By redirecting the outstream and/or errorstream to a file, the command output and errors
will be no longer shown on the terminal.

1.5 SCLI framework management

1.5.1 SCLI supported variables

SCLI framework supports the following variables.

Environment variables: typically viewable and modifiable by the user and used to control the
behavior of the SCLI shell.
The read/write built-in environment variables (or built-in properties) control the behavior of the
SCLI framework. The read-only built-in environment variables expose certain attributes which
are common to all sessions in the cluster or the node.

Table 4: Set of read-only variables

Read-Only built-in environment variables

session-id

user

node-name

In case of shared accounts (for example, _nokadmin), the environment variables are stored in
the same file for all the sessions of the same user account. If a user in a session decides to
save the updated environment variables, the next session opened under the same user

© 2023 Nokia. Nokia confidential 25


account will load the updated set of variables.
Session variables: defined by SCLI commands during execution for further use by the same or
a subsequent command executed in the same session. These variables allow exchange of
information/state between commands executed in the same session. Read-only session
variables cannot be modified by the user.
Unlike the environment variables, session variables are not saved to a default file and loaded
back automatically from the default file upon session start. Session variables are saved only to
a user specified file and have to be explicitly loaded back by user from this file, using the load
command.
Command variables: store the user input for the current command. They are valid in the
context of executing one command and are cleaned before executing the next command.

1.5.2 SCLI built-in commands

The following SCLI commands are used for managing environment and session variables.

26 © 2023 Nokia. Nokia confidential


Table 5: Commands for manipulating files

Command Description

set cli env [NAME VALUE]+ This command allows to define or modify environment
variables. The change to the environment is applicable
only for the current SCLI session where the command is
executed.

Note:

Built-in environment variables are set only via the


set cli built-in command. The user is not
able to set/modify built-in environment variables via
the set cli env command.

set cli session-limits The set cli session-limits command allows


show cli session-limits to set limits for interactive and persistent SCLI sessions.
You can set session limit per node, per user, or per IP
address, or define the maximum allowed idle timeout
for all sessions. All these limits are applicable only to the
current node and only for a non-root user.
The show cli session-limits command is used
to show limits for interactive and persistent SCLI
sessions.

© 2023 Nokia. Nokia confidential 27


Command Description

save cli env The save cli env command is used to save the
save cli env <SAVE_MODE> environment variables to a file. Save mode can be one
save cli env file of the following:
<FILENAME> • update: modify existing variables, add new variables
save cli env file • replace: remove all the existing variables first and then
<FILENAME> <SAVE_MODE> write to the file
• create: create a new file. This command fails if a file
with the same name already exists.

Note:

Default save mode is update. Filename is optional.


If no filename is given, the variables are saved in the
.cshrc file in the user's home directory. If the user
does not have a home directory that is accessible
from the SCLI shell, then the save command will
fail. For such users, the command has to be
executed by explicitly specifying a filename.
Read-only built-in environment variables are not
saved.

load cli env The load cli env command is used to load the
load cli env file environment variables from a file. Load mode can be
<FILENAME> one of the following:
load cli env file • update: values of existing variables are modified and
<FILENAME> <LOAD_MODE> then new variables are added
• replace: all variables are cleaned and then the new file
is loaded
• add: new variables are added and existing ones are not
modified.

Note:

Default load mode is update. Filename is optional.


If no filename is given, the environment variables are
populated from the .cshrc file in the user's home
directory.
Read-only built-in environment variables are not
loaded. Any variable having the same name as a
read-only variable is not loaded as well.

28 © 2023 Nokia. Nokia confidential


Command Description

save cli session file This command saves the session variables to a file. Save
<FILENAME> mode can be one of the following:
save cli session file • update: modify existing variables, add new variables
<FILENAME> <SAVE_MODE> • replace: remove all the existing variables first and then
write to the file
• create: create a new file. This command fails if a file
with the same name already exists.

Note:

Default save mode is update. Filename is


mandatory.
Read-only built-in session variables are not saved.

load cli session file The load cli session command is used to load
<FILENAME> the session variables from a file. Load mode can be one
load cli session file of the following:
<FILENAME> <LOAD_MODE> • update: values of existing variables are modified and
then new variables are added
• replace: all variables are cleaned and then the new file
is loaded
• add: new variables are added and existing ones are not
modified.

Note:

Default load mode is update. Filename is


mandatory.
Read-only session variables are not loaded.

1.5.3 SCLI built-in environment variables

SCLI built-in environment variables (built-in properties) control the SCLI framework behavior.

These properties are modified using the following command:

set cli built-in <property-name> <property-value>

The following table lists the built-in environment variables.

© 2023 Nokia. Nokia confidential 29


Table 6: List of built-in environment variables

Property Description

print-header Built-in feature that adds a header to all executed commands.


Default value: off
Allowed values: on | off
When this variable is set to on, a header is printed at the beginning of the
command output. For example:
>>Executing a command CLA-0@TestCluster [2015-01-09 11:59:53 +0200]

print-footer Built-in feature that adds a footer to all executed commands.


Default value: off
Allowed values: on | off
When this variable is set to on, the following footer is printed at the end of every
command’s output:
>>Command executed successfully.

on-failure Built in feature that controls the system on what to do if an error happens when
executing a batch of commands, that is, to stop after the first error or continue.
Default value: stop
Allowed values: continue | stop

rows Number of output rows to be displayed on the console.


If rows is set to -1, the output scrolls until last page. If it is set to 0, the number
of rows is the number of the terminal rows.
Default value: 0
Allowed values: any integer from -1 to 99

output This variable controls the format used to display the command output.
Default value: pretty
Allowed values: pretty | structured | xml

Note:

The majority of the commands support only the pretty mode. Only few
commands support the structured or xml mode.

constraint- With this variable set to on, additional information about the expected value is
hint included in the parameter hint, if the value is restricted by any of the built-in
constraints. This additional information contains the type(s) of the constraint(s)
and the expected value(s).
Default value: off
Allowed values: on | off

confirmation- For SCLI commands that are defined to ask for confirmation prompt, this variable
prompt controls whether to ask for confirmation or not. The SCLI commands deemed
dangerous are typically defined to ask for confirmation from the user before
execution.
Default value: on
Allowed values: on | off

30 © 2023 Nokia. Nokia confidential


Property Description

relative-mode This variable controls whether the user can enter the command sub-level or not.
When it is set to on, the user can move through the command tree by pressing
Enter after every written command. For example:
user@CLA-1 [TestCluster] > set Enter
user@CLA-1 [TestCluster] set >
The parameters under that level then become accessible directly without the
need to type the full command.
Default value: off
Allowed values: on | off

© 2023 Nokia. Nokia confidential 31


2. Glossary

A list of terms and their definition.

command-line interface interface in which the users interact with their computers by typing
(CLI) text into a command line

Structured Command Line text-based user interface for viewing and managing the configuration
Interface (SCLI) and state of a Network Element (NE). It is interactive and menu-
based, and provides context-sensitive help and auto-completion of
commands to guide the user in the execution of commands. It
provides audit logging. The SCLI shell is the preferred, safe, and
secure management shell to be used for managing, monitoring, and
troubleshooting the NE

32 © 2023 Nokia. Nokia confidential

You might also like