cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2343
Views
0
Helpful
4
Replies

Passing Arguments between EEM Policies

lashariimtiaz
Level 1
Level 1

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,

2 Accepted Solutions

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

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

View solution in original post

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/ .

View solution in original post

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

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

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

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/ .

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