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

Fix(eos_cli_config_gen): Fix the errdisable documentation J2 expects recovery.interval to be always set #4979

Merged
merged 13 commits into from
Feb 7, 2025
Original file line number Diff line number Diff line change
Expand Up @@ -11601,6 +11601,8 @@ ip nat synchronization

### Errdisable Summary

Errdisable recovery timer interval: 300 seconds

gmuloc marked this conversation as resolved.
Show resolved Hide resolved
| Detect Cause | Enabled |
| ------------- | ------- |
| acl | True |
Expand All @@ -11612,24 +11614,24 @@ ip nat synchronization
| xcvr-overheat | True |
| xcvr-power-unsupported | True |

| Detect Cause | Enabled | Interval |
| ------------- | ------- | -------- |
| arp-inspection | True | 300 |
| bpduguard | True | 300 |
| dot1x | True | 300 |
| hitless-reload-down | True | 300 |
| lacp-rate-limit | True | 300 |
| link-flap | True | 300 |
| no-internal-vlan | True | 300 |
| portchannelguard | True | 300 |
| portsec | True | 300 |
| speed-misconfigured | True | 300 |
| tapagg | True | 300 |
| uplink-failure-detection | True | 300 |
| xcvr-misconfigured | True | 300 |
| xcvr-overheat | True | 300 |
| xcvr-power-unsupported | True | 300 |
| xcvr-unsupported | True | 300 |
| Detect Cause | Enabled |
| ------------- | ------- |
| arp-inspection | True |
| bpduguard | True |
| dot1x | True |
| hitless-reload-down | True |
| lacp-rate-limit | True |
| link-flap | True |
| no-internal-vlan | True |
| portchannelguard | True |
| portsec | True |
| speed-misconfigured | True |
| tapagg | True |
| uplink-failure-detection | True |
| xcvr-misconfigured | True |
| xcvr-overheat | True |
| xcvr-power-unsupported | True |
| xcvr-unsupported | True |

```eos
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
- [IP DHCP Snooping Device Configuration](#ip-dhcp-snooping-device-configuration)
- [IP NAT](#ip-nat)
- [IP NAT Device Configuration](#ip-nat-device-configuration)
- [Errdisable](#errdisable)
- [Errdisable Summary](#errdisable-summary)
- [MACsec](#macsec)
- [MACsec Summary](#macsec-summary)
- [MACsec Device Configuration](#macsec-device-configuration)
Expand Down Expand Up @@ -1498,6 +1500,37 @@ ip dhcp snooping
ip nat synchronization
```

## Errdisable

### Errdisable Summary

| Detect Cause | Enabled |
| ------------- | ------- |
| arp-inspection | True |
| bpduguard | True |
| hitless-reload-down | True |
| lacp-rate-limit | True |
| link-flap | True |
| no-internal-vlan | True |
| portchannelguard | True |
| portsec | True |
| tapagg | True |
| uplink-failure-detection | True |

```eos
!
errdisable recovery cause arp-inspection
errdisable recovery cause bpduguard
errdisable recovery cause hitless-reload-down
errdisable recovery cause lacp-rate-limit
errdisable recovery cause link-flap
errdisable recovery cause no-internal-vlan
errdisable recovery cause portchannelguard
errdisable recovery cause portsec
errdisable recovery cause tapagg
errdisable recovery cause uplink-failure-detection
```

## MACsec

### MACsec Summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ ip dhcp snooping
!
switchport default mode routed
!
errdisable recovery cause arp-inspection
errdisable recovery cause bpduguard
errdisable recovery cause hitless-reload-down
errdisable recovery cause lacp-rate-limit
errdisable recovery cause link-flap
errdisable recovery cause no-internal-vlan
errdisable recovery cause portchannelguard
errdisable recovery cause portsec
errdisable recovery cause tapagg
errdisable recovery cause uplink-failure-detection
!
flow tracking sampled
sample 666
hardware offload ipv4 ipv6
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
errdisable:
recovery:
causes:
- bpduguard
- arp-inspection
Vibhu-gslab marked this conversation as resolved.
Show resolved Hide resolved
- portsec
- hitless-reload-down
- lacp-rate-limit
- link-flap
- no-internal-vlan
- portchannelguard
- tapagg
- uplink-failure-detection
Original file line number Diff line number Diff line change
Expand Up @@ -9,73 +9,25 @@
## Errdisable

### Errdisable Summary
{% if errdisable.recovery.interval is arista.avd.defined %}

Errdisable recovery timer interval: {{ errdisable.recovery.interval }} seconds
{% endif %}
{% if errdisable.detect.causes is arista.avd.defined %}

{% if errdisable.recovery is defined %}
{% if errdisable.detect.causes is defined %}
| Detect Cause | Enabled |
| ------------- | ------- |
{% for cause in errdisable.detect.causes | arista.avd.natural_sort %}
{% if cause == 'acl' %}
| {{ cause }} | True |
{% elif cause == 'arp-inspection' %}
| {{ cause }} | True |
{% elif cause == 'dot1x' %}
| {{ cause }} | True |
{% elif cause == 'link-change' %}
| {{ cause }} | True |
{% elif cause == 'tapagg' %}
| {{ cause }} | True |
{% elif cause == 'xcvr-misconfigured' %}
{% for cause in errdisable.detect.causes | arista.avd.natural_sort %}
| {{ cause }} | True |
{% elif cause == 'xcvr-overheat' %}
| {{ cause }} | True |
{% elif cause == 'xcvr-power-unsupported' %}
| {{ cause }} | True |
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% if errdisable.recovery.causes is arista.avd.defined %}

{% if errdisable.recovery.interval is arista.avd.defined %}
{% endif %}
{% if errdisable.recovery.causes is defined %}
| Detect Cause | Enabled | Interval |
| ------------- | ------- | -------- |
{% for cause in errdisable.recovery.causes | arista.avd.natural_sort %}
{% if cause == 'arp-inspection' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'bpduguard' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'dot1x' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'hitless-reload-down' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'lacp-rate-limit' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'link-flap' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'no-internal-vlan' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'portchannelguard' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'portsec' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'speed-misconfigured' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'tapagg' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'uplink-failure-detection' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'xcvr-misconfigured' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'xcvr-overheat' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'xcvr-power-unsupported' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% elif cause == 'xcvr-unsupported' %}
| {{ cause }} | True | {{ errdisable.recovery.interval }} |
{% endif %}
{% endfor %}
{% endif %}
| Detect Cause | Enabled |
| ------------- | ------- |
{% for cause in errdisable.recovery.causes | arista.avd.natural_sort %}
| {{ cause }} | True |
{% endfor %}
{% endif %}

```eos
Expand Down