Cli_Open; Cli_Read - Cisco ASR 9000 Serie Configuration Manuals

Aggregation services router system
Table of Contents

Advertisement

Configuring and Managing Embedded Event Manager Policies
Set _cerrno
None

cli_open

Allocates a vty, creates an EXEC command-line interface (CLI) session, and connects the vty to a channel
handler. Returns an array including the channel handler.
Note
Each call to cli_open initiates a Cisco IOS XR software EXEC session that allocates a Cisco IOS XR
software vty. The vty remains in use until the cli_close routine is called. Vtys are allocated from the pool
of vtys that are configured using the line vty vty-pool CLI configuration command. Be aware that the
cli_open routine fails when two or fewer vtys are available, preserving the remaining vtys for Telnet use.
Syntax
cli_open
Arguments
None
Result String
"tty_id {%s} pty {%d} tty {%d} fd {%d}"
Event Type
tty_id
pty
tty
fd
Set _cerrno
• Cannot get pty for EXEC.
• Cannot create an EXEC CLI session.
• Error reading the first prompt.

cli_read

Reads the command output from the specified command-line interface (CLI) channel handler until the pattern
of the router prompt occurs in the contents read. Returns all the contents read up to the match.
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
CLI Library Command Extensions
Description
TTY ID.
PTY device name.
TTY device name.
CLI channel handler.
183

Advertisement

Table of Contents
loading

Table of Contents