cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2003
Views
0
Helpful
2
Replies

IOS XR tcl script can not open the CLI session (to execute commands)

tiago_pisco
Level 1
Level 1

Hello,
I m having a problem: my tcl script is not opening the cli session. And the system does not return any helpfull message.

The start of the script is:

::cisco::eem::event_register_syslog pattern {%PKT_INFRA-LINK-3-UPDOWN : Interface TenGigE0/0/1/0, changed state to Down}

namespace import ::cisco::eem::*

namespace import ::cisco::lib::*

array set arr_einfo [event_reqinfo]

action_syslog msg "Script running (interface down)"

if [catch {cli_open} result] {

    error $result $errorInfo

} else {

    array set cli1 $result

action_syslog msg "Script teste 1!!"

It would be nice if someone would have some tip.
Best Regards

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

You're missing a trailing '}'.  Your script should be:

::cisco::eem::event_register_syslog pattern {%PKT_INFRA-LINK-3-UPDOWN : Interface TenGigE0/0/1/0, changed state to Down}

namespace import ::cisco::eem::*

namespace import ::cisco::lib::*

array set arr_einfo [event_reqinfo]

action_syslog msg "Script running (interface down)"

if [catch {cli_open} result] {

    error $result $errorInfo

} else {

    array set cli1 $result

}

action_syslog msg "Script teste 1!!"

View solution in original post

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

You're missing a trailing '}'.  Your script should be:

::cisco::eem::event_register_syslog pattern {%PKT_INFRA-LINK-3-UPDOWN : Interface TenGigE0/0/1/0, changed state to Down}

namespace import ::cisco::eem::*

namespace import ::cisco::lib::*

array set arr_einfo [event_reqinfo]

action_syslog msg "Script running (interface down)"

if [catch {cli_open} result] {

    error $result $errorInfo

} else {

    array set cli1 $result

}

action_syslog msg "Script teste 1!!"

Script is Working ??