Cli Library Command Extensions - Cisco ASR 9000 Serie Configuration Manuals

Aggregation services router system
Table of Contents

Advertisement

Configuring and Managing Embedded Event Manager Policies
Result String
The text of the e-mail template file with all the global variables substituted.
Set _cerrno
• cannot open e-mail template file
• cannot close e-mail template file

CLI Library Command Extensions

All command-line interface (CLI) library command extensions belong to the ::cisco::eem namespace.
This library provides users the ability to run CLI commands and get the output of the commands in Tcl. Users
can use commands in this library to spawn an exec and open a virtual terminal channel to it, write the command
to execute to the channel so that the command will be executed by exec, and read back the output of the
command.
There are two types of CLI commands: interactive commands and non-interactive commands.
For interactive commands, after the command is entered, there will be a "Q&A" phase in which the router
will ask for different user options, and the user is supposed to enter the answer for each question. Only after
all the questions have been answered properly will the command run according to the user's options until
completion.
For noninteractive commands, once the command is entered, the command will run to completion. To run
different types of commands using an EEM script, different CLI library command sequences should be used,
which are documented in the
the
Using the CLI Library to Run an Interactive Command, on page
Exported Tcl Command Extensions
cli_close
Closes the exec process and releases the VTY and the specified channel handler connected to the command-line
interface (CLI).
Syntax
cli_close fd tty_id
Arguments
fd
tty_id
Using the CLI Library to Run a Noninteractive Command, on page 187
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
CLI Library Command Extensions
187.
(Mandatory) The CLI channel handler.
(Mandatory) The TTY ID returned from the cli_open
command extension.
and in
181

Advertisement

Table of Contents
loading

Table of Contents