08-30-2007 03:25 AM
Help me please with getting rid of the following error message:
c1841#tclsh tftp://10.1.0.27/eemsample.tcl
Loading eemsample.tcl from 195.239.44.46 (via FastEthernet0/1): !
[OK - 171 bytes]
unknown namespace in import pattern "::cisco::eem::*"
while executing
"namespace import ::cisco::eem::*"
(file "tftp://10.1.0.27/eemsample.tcl" line 4)
c1841#
eemsample.tcl content:
namespace import ::cisco::eem::*
action_syslog priority info msg "..."
08-30-2007 08:37 AM
As I said in the other thread, you can't use EEM libraries as-is in tclsh scripts. If you want to make use of EEM constructs, your best bet is to convert the tclsh script to an EEM TCL Policy. In this case, it would be:
::cisco::eem::event_register_none
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
action_syslog priority info msg "This is a test"
Then to run this script, create a directory on flash called eem_policies, then copy this script into the eem_policies directory. Then add the following configuration commands:
event manager directory user policy flash:/eem_policies
event manager policy eemsample.tcl type user
Then to run the policy, run the following command from EXEC mode:
event manager run eemsample.tcl
12-07-2015 02:35 AM
dude thnx it saved my day :P
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide