Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

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

Hi,

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.

5 REPLIES
Blue

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

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"

http://www.cisco.com/en/US/prod/collateral/switches/ps5718/ps708/white_paper_c11-567132.html

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

New Member

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

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: "

Cisco Employee

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

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.

New Member

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

Thank you Joe,

Do you know the target XR release for EEM synchro ?

Cisco Employee

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

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

313
Views
0
Helpful
5
Replies
CreatePlease to create content