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
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: