ezdo - execute common commands
SYNOPSIS
package require libcisco
|
The ezdo command is used to perform a specifc task on a Cisco network device. The "Easy" family of functions provide an OS layer of abstraction for common commands. The first argument to ezdo specifies the task to be performed on the target device. A list of valid tasks and their associated options is detailed below.
Note: Before making a call to ezdo, a session must first be
opened to the target device using the session open command.
The following code will open a session to 192.168.1.1, put the device in
"enable" mode, enable ICMP debugging, clear the counters, and logout.
COMMANDS
The following options are supported:
On success, ezdo savecfg returns 0.
On error, a short text message is returned beginning with the string "err".
On success, ezdo clearcntrs returns 0.
On error, a short text message is returned beginning with the string "err".
Args is one or more arguments to be concatenated together and
evaluated on the target system as a debug command.
On success, ezdo debug returns 0.
On error, a short text message is returned beginning with the string "err".
Args is one or more arguments to be concatenated together and
evaluated on the target system as an undebug command.
On success, ezdo undebug returns 0.
On error, a short text message is returned beginning with the string "err".
The following options are supported:
On success, ezdo reload returns 0.
On error, a short text message is returned beginning with the string "err".
EXAMPLE
#!/bin/sh # the next line restarts using the tclsh interpreter \ exec tclsh "$0" "$@" package require libcisco namespace import libcisco::* session open 192.168.1.1 cisco session enable san-fran ezdo debug ip icmp ezdo clearcntrs session close |