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

EEM policy script blows up at "package require"

I find that I'm able to use "package require udp" in both the interactive TCL interpreter and in scripts that I keep in flash. For example:

router#tclsh

router(tcl)#package require udp

1.0

router(tcl)#

Using that same directive in an EEM policy script causes a problem:

router#more flash:/eem_policies/test.tcl

::cisco::eem::event_register_none

namespace import ::cisco::eem::*

namespace import ::cisco::lib::*

package require udp

router#event manager run test.tcl 

can't find package udp

    while executing

"package require udp"

    invoked from within

"$slave eval $Contents"

    (procedure "eval_script" line 7)

    invoked from within

"eval_script slave $scriptname"

    invoked from within

"if {$security_level == 1} {       #untrusted script

     interp create -safe slave

     interp share {} stdin slave

     interp share {} stdout slave

..."

    (file "tmpsys:/lib/tcl/base.tcl" line 50)

Tcl policy execute failed: can't find package udp

router#

 

Can somebody clue me in on how I might use the UDP package from within a policy as opposed to a vanilla script?

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

You cannot.  EEM Tcl does not

You cannot.  EEM Tcl does not support UDP.  It has been requested, but thus far unimplemented.

2 REPLIES
Cisco Employee

You cannot.  EEM Tcl does not

You cannot.  EEM Tcl does not support UDP.  It has been requested, but thus far unimplemented.

Community Member

Thanks very much, Joe!

Thanks very much, Joe!

395
Views
0
Helpful
2
Replies
CreatePlease to create content