[EEM] Enhance EEM applet configuration capabilities #388
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds more comprehensive Embedded Event Manager (EEM) applet support to the
iosxe_eemresource, enabling automation of network events through RESTCONF/YANG.Motivation
EEM is a critical IOS-XE feature that allows network operators to automate responses to system events. Prior to this PR, the
iosxe_eemresource had limited support for EEM applets - onlycli_commandactions were functional. This enhancement enables full applet configuration including:New Attributes Added
Event Types (4 categories)
Syslog Events:
event_syslog_pattern- Syslog message pattern to matchevent_syslog_occurs- Number of occurrences before triggeringevent_syslog_maxrun- Maximum runtime in secondsevent_syslog_ratelimit- Rate limit between eventsevent_syslog_period- Period for occurrence countingTimer Watchdog Events:
event_timer_watchdog_time- Timer interval in secondsevent_timer_watchdog_name- Timer nameevent_timer_watchdog_maxrun- Maximum runtimeevent_timer_watchdog_ratelimit- Rate limitTimer Cron Events:
event_timer_cron_entry- Cron expressionevent_timer_cron_name- Timer nameevent_timer_cron_maxrun- Maximum runtimeevent_timer_cron_ratelimit- Rate limitCLI Events:
event_cli_pattern- CLI command patternevent_cli_sync- Synchronous executionevent_cli_skip- Skip CLI commandAction Types (40+ attributes)
if_*,elseif_*,else,while_*,end,foreach_*,break,continue,exit,reloadset_varname,set_value,increment_*,decrement_*,append_*,divide_*regexp_string_pattern,regexp_string_input,regexp_string_match,regexp_string_match1/2/3cli_command,syslog_*,snmp_trap_*,puts,gets,waitcounter_*,context_*,string_trim,info_type_snmp_*,handle_error_typeRegarding
exclude_test: trueon Action AttributesMost action attributes in
gen/definitions/eem.yamlhaveexclude_test: trueset. This is intentional and necessary because:choiceblock (list-option) where action types are mutually exclusive. A single action cannot have bothcli_commandANDregexpattributes - they represent different action types. The test generator can only include one representative action type.event_timer_watchdog_*,event_timer_cron_*, andevent_syslog_*are mutually exclusive event triggers. An applet can only have one event type.cli_commandaction withevent_syslogtrigger). Testing all 40+ action attributes would require dozens of separate test configurations with different action type combinations.Manual Testing Performed
All action types have been manually validated against a Catalyst 8000v running IOS-XE 17.15.x using the terraform-iosxe-nac-iosxe NAC module:
Testing
Acceptance tests pass against IOS-XE 17.15.x: