Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

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

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
Cisco Employee

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

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!!"

1 REPLY
Cisco Employee

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

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!!"

390
Views
0
Helpful
1
Replies
CreatePlease to create content