avd
avd copied to clipboard
Fix(eos_cli_config_gen): Fix the schema and template for action in event-handler.
Change Summary
Fix the schema and template for action in event-handler
Related Issue(s)
Fixes #3899
Component(s) name
arista.avd.eos_cli_config_gen
Proposed changes
Currently, action_type
key has three valid_values bash
, log
and increment
but the combination of 2 keys can be implemented in config.
event-handler handler1
action bash echo"action"
action increment device-health metric metric1
event-handler handler1
action log
action increment device-health metric metric1
Deprecating the existing action_type
and action
key and adding new key -
actions:
bash_command: <str>
# Log a message when the event is triggered.
log: <bool>
# Name of device-health metric.
increment_device_health_metric: <str>
Also the current template logic for action_type
generates wrong config if action_type
is log
or increment
, so fixing it.
How to test
Check the config in CLI.
Checklist
User Checklist
- N/A
Repository Checklist
- [x] My code has been rebased from devel before I start
- [x] I have read the CONTRIBUTING document.
- [x] My change requires a change to the documentation and documentation have been updated accordingly.
- [x] I have updated molecule CI testing accordingly. (check the box if not applicable)