Is EEM able to "catch" XR candidate configs before commit ?

Unanswered Question
Jun 30th, 2010


We have a core network which is mostly XR.

Syntaxical and semantical checks before commits are correctly performed by the system, but I would like to add my own checks to reinforce engineering rules.

I am wondering if there is a trick which allow someone to add customized checks when a user tries to commit a config.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
yjdabear Wed, 06/30/2010 - 19:56

I'd venture a guess that EEM applet is probably not up to the task due to the potential complexity of the custom "engineering rules". So, going down the path of using EEM Tcl policy (or policies), it seems on the XR, the "conf t" equivalent is "configure", which is the CLI pattern you want to intercept, or at least start "recording" at. Then upon detecting CLI input of either "end" or "configure", your script will either have already checked the configs entered so far line-by-line, stopping in place and warning the engineer if/when necessary, OR the script does the checking en masse at the "end" (no pun intended) by reading from the recorded configs saved in the Tcl's buffer or written to a file on the flash. If that's on the right track, I think the "Annotated TCL Script Example" on this page provides a rudimentary skeleton for this type of command interception & verification, via the line-by-line approach, which could make the script pretty big and unwieldy, depending on the complexity of your "engineering rules"

The key words that I searched for was "Setting sync to yes enables the command to be executed, but the logic will really decide  whether the command is ultimately permitted."

alainm Thu, 07/01/2010 - 06:20

Hi yjdabear,

it's an interesting track to follow but it seems that the "event_detector_cli" is not yet implemented on XR.

Here is the result of a test on an ASR :

RP/0/RSP0/CPU0:Jul  1 09:18:03.822 : syslog_dev[92]: syslog_dev: Register event failed:invalid command name "::cisco::eem::event_register_cli"

RP/0/RSP0/CPU0:Jul  1 09:18:03.822 : syslog_dev[92]: syslog_dev:     while executing
RP/0/RSP0/CPU0:Jul  1 09:18:03.822 : syslog_dev[92]: syslog_dev: "::cisco::eem::event_register_cli occurs 1 pattern commit maxrun 90 queue_priority low nice 1
RP/0/RSP0/CPU0:Jul  1 09:18:03.822 : syslog_dev[92]: syslog_dev: "

Joe Clarke Thu, 07/01/2010 - 11:32

This isn't currently possible on XR because it lacks the CLI ED.  Even using something like the syslog ED would not work since it is asynchronous.  The good news is that EEM will eventally be synchronized between IOS and IOS-XR so it would be possible to do this kind of thing in the future.

alainm Thu, 07/01/2010 - 12:05

Thank you Joe,

Do you know the target XR release for EEM synchro ?

Joe Clarke Thu, 07/01/2010 - 13:13

Some of the sync is coming in 4.0, but I believe a full sync won't happen until 4.1.


This Discussion