cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
432
Views
0
Helpful
3
Replies
Beginner

Best practice of invoking EEM within EEM

To simplify scripting, I want to invoke another EEM within EEM. Is there a best practice for how it is done?

3 REPLIES 3
Hall of Fame Cisco Employee

Re: Best practice of invoking EEM within EEM

You can do this in a number of ways depending on your use case.  But I tend to like application events:

 

Applet 1:

action X publish-event sub-system 798 type 1 arg1 FOO

 

Applet 2:

event appl sub-system 798 type 1

action X puts $_application_data1 <== Prints FOO

Beginner

Re: Best practice of invoking EEM within EEM

I apologize that I missed your reply earlier. It seems like a cool way to pass control from one applet to another. Can you tell me where I can find documentation to "sub-system 798 type 1". Many advanced EEM scripts have some magic numbers. Is there a document that list all the sub-system or SNMP events that can be used in EEM?

Highlighted
Hall of Fame Cisco Employee

Re: Best practice of invoking EEM within EEM

You're right that these are magic numbers.  Unfortunately, there isn't a list of all subsystems since the rest are internal to IOS.  Subsystem 798 is reserved for "user defined" and type 1 is just a convention.  You could have different types within 798 if you want different events.  That is, consider 798 your user-defined namespace, and use as many types there as you want.

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards