Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cut(eos_cli_config_gen): Remove the deprecated keys for event-handlers #4279

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ansible_collections/arista/avd/docs/porting-guides/5.x.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ The following data model keys have been removed from `eos_cli_config_gen` in v5.
| Removed key | New key |
| ----------- | ------- |
| old key 1(daemon_terminattr) | new key(TODO) |
| old key 2.1(event_handlers) | new key(TODO) |
| old key 2.2(event_handlers) | new key(TODO) |
| old key 2.3(event_handlers) | new key(TODO) |
| event_handlers.action | event_handlers.actions.bash_command |
| event_handlers.action_type | event_handlers.actions |
| event_handlers.regex | event_handlers.trigger_on_logging.regex |
| old key 3(flow_trackings) | new key(TODO) |
| old key 4.1(management_api_gnmi) | new key(TODO) |
| old key 4.2(management_api_gnmi) | new key(TODO) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
- [SNMP](#snmp)
- [SFlow](#sflow)
- [VM Tracer Sessions](#vm-tracer-sessions)
- [Event Handler](#event-handler)
- [Flow Tracking](#flow-tracking)
- [Hardware TCAM Profile](#hardware-tcam-profile)
- [Custom TCAM Profiles](#custom-tcam-profiles)
Expand Down Expand Up @@ -446,32 +445,6 @@ vmtracer session session_2
password 7 encrypted_password
```

### Event Handler
ClausHolbechArista marked this conversation as resolved.
Show resolved Hide resolved

#### Event Handler Summary

| Handler | Actions | Trigger | Trigger Config |
| ------- | ------- | ------- | -------------- |
| CONFIG_VERSIONING | bash <code>FN=/mnt/flash/startup-config; LFN="`ls -1 $FN.*-* \| tail -n 1`"; if [ -z "$LFN" -o -n "`diff -I 'last modified' $FN $LFN`" ]; then cp $FN $FN.`date +%Y%m%d-%H%M%S`; ls -1r $FN.*-* \| tail -n +11 \| xargs -I % rm %; fi</code> | on-startup-config | - |
| evpn-blacklist-recovery | bash <code>FastCli -p 15 -c "clear bgp evpn host-flap"</code> | on-logging | - |

#### Event Handler Device Configuration

```eos
!
event-handler CONFIG_VERSIONING
trigger on-startup-config
action bash FN=/mnt/flash/startup-config; LFN="`ls -1 $FN.*-* | tail -n 1`"; if [ -z "$LFN" -o -n "`diff -I 'last modified' $FN $LFN`" ]; then cp $FN $FN.`date +%Y%m%d-%H%M%S`; ls -1r $FN.*-* | tail -n +11 | xargs -I % rm %; fi
delay 0
!
event-handler evpn-blacklist-recovery
trigger on-logging
regex EVPN-3-BLACKLISTED_DUPLICATE_MAC
action bash FastCli -p 15 -c "clear bgp evpn host-flap"
delay 300
asynchronous
```

### Flow Tracking

#### Flow Tracking Sampled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,18 +313,6 @@ hardware tcam
ip address virtual source-nat vrf TEST_01 address 1.1.1.1
ip address virtual source-nat vrf TEST_02 address 1.1.1.2
!
event-handler CONFIG_VERSIONING
trigger on-startup-config
action bash FN=/mnt/flash/startup-config; LFN="`ls -1 $FN.*-* | tail -n 1`"; if [ -z "$LFN" -o -n "`diff -I 'last modified' $FN $LFN`" ]; then cp $FN $FN.`date +%Y%m%d-%H%M%S`; ls -1r $FN.*-* | tail -n +11 | xargs -I % rm %; fi
delay 0
!
event-handler evpn-blacklist-recovery
trigger on-logging
regex EVPN-3-BLACKLISTED_DUPLICATE_MAC
action bash FastCli -p 15 -c "clear bgp evpn host-flap"
delay 300
asynchronous
!
group bgp bar
vrf red
neighbor peer-group-baz
Expand Down

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
| Handler | Actions | Trigger | Trigger Config |
| ------- | ------- | ------- | -------------- |
{% for handler in event_handlers | arista.avd.natural_sort('name') %}
{% if handler.action_type is arista.avd.defined %}
{% set actions = handler.action_type %}
{% if handler.action is arista.avd.defined %}
{% set action = handler.action | replace('|', '\|') %}
{% set actions = actions ~ ' <code>' ~ action ~ '</code>' %}
{% endif %}
{% endif %}
{% if handler.actions is arista.avd.defined %}
{% set actions = [] %}
{% if handler.actions.bash_command is arista.avd.defined %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ event-handler {{ handler.name }}
{% else %}
trigger {{ handler.trigger }}
{% endif %}
{% if handler.regex is arista.avd.defined %}
regex {{ handler.regex }}
{% endif %}
{% endif %}
{% if handler.action is arista.avd.defined and handler.action_type is arista.avd.defined %}
action {{ handler.action_type }} {{ handler.action }}
{% endif %}
{% if handler.actions.bash_command is arista.avd.defined %}
{% set bash_command = handler.actions.bash_command %}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading