06-04-2013 08:16 AM
Dear Sir,
Is there a way to pass variable/argument b/w policies in eem? or
Is there a way to set the value of an eem environment variable?
I want to run a child policy from parent eem policy and want to pass the value of a variable to child.Tried to use argument in action publish-event but its taking the name of variable itself as the argument not the value stored inside the variable.
Similary, i tried to change the value of a user-defined environement variable but it is also not working.
Need your help,
Solved! Go to Solution.
06-04-2013 08:30 AM
You can pass arguments using application events with variable arguments. I just tested this. What version of IOS are you using:
event manager applet ep
event none
action 1.0 set var "TEST123"
action 2.0 publish-event sub-system 798 type 1 arg1 "$var"
event manager applet ec
event application sub-system 798 type 1
action 1.0 puts "XXX: $_application_data1"
Router#event manager run ep
*Jun 4 15:30:10.215: %HA_EM-6-LOG: ec: XXX: TEST123
06-04-2013 08:47 AM
Ah, this was fixed as part of CSCtl74290. You could upgrade to 15.3(2)T (if GNS3 supports it) or switch to using Tcl. You can convert your applet using http://www.marcuscom.com/convert_applet/ .
06-04-2013 08:30 AM
You can pass arguments using application events with variable arguments. I just tested this. What version of IOS are you using:
event manager applet ep
event none
action 1.0 set var "TEST123"
action 2.0 publish-event sub-system 798 type 1 arg1 "$var"
event manager applet ec
event application sub-system 798 type 1
action 1.0 puts "XXX: $_application_data1"
Router#event manager run ep
*Jun 4 15:30:10.215: %HA_EM-6-LOG: ec: XXX: TEST123
06-04-2013 08:38 AM
Thanks for the reply.
But still its not working. I am testing in GNS3.
event manager applet ep
event none
action 1.0 set var "TEST123"
action 2.0 publish-event sub-system 798 type 1 arg1 "$var"
event manager applet ec
event application sub-system 798 type 1
action 1.0 puts "XXX: $_application_data1"
Router#event manager run ep
Router#
*Jun 4 19:34:33.523: %HA_EM-6-LOG: ec: XXX: $var
Router#sh ver | i IOS
Cisco IOS Software, 7200 Software (C7200-ADVENTERPRISEK9-M), Version 12.4(24)T, RELEASE SOFTWARE (fc1)
Router#
===========
Thanks
06-04-2013 08:47 AM
Ah, this was fixed as part of CSCtl74290. You could upgrade to 15.3(2)T (if GNS3 supports it) or switch to using Tcl. You can convert your applet using http://www.marcuscom.com/convert_applet/ .
06-04-2013 11:57 AM
First of all I would like to thank you for this kind support. Secondly, I am quite impressed by quick response. I would receommend this forum to my colleagues.
Thanks Joseph.
Regards,
Imtiaz
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