From d8ebf7c639b2da5761743473379d4c7a7d212ad8 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 13 Nov 2024 09:11:57 +0100 Subject: [PATCH 1/3] Feat(eos_cli_config_gen)-Add_bfd_slow_timer_knob --- .../eos_cli_config_gen/documentation/devices/host1.md | 1 + .../molecule/eos_cli_config_gen/intended/configs/host1.cfg | 1 + .../inventory/host_vars/host1/router-bfd.yml | 1 + .../avd/roles/eos_cli_config_gen/docs/tables/router-bfd.md | 4 ++++ .../_eos_cli_config_gen/j2templates/eos/router-bfd.j2 | 7 +++++-- .../schema/eos_cli_config_gen.schema.yml | 5 +++++ .../schema/schema_fragments/router_bfd.schema.yml | 5 +++++ 7 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md index b956814906e..11794a44b31 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md @@ -5348,6 +5348,7 @@ policy-map type pbr PM_PBR_BREAKOUT ```eos ! router bfd + slow-timer 5000 interval 900 min-rx 900 multiplier 50 default multihop interval 300 min-rx 300 multiplier 3 local-address 192.168.255.1 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg index 2c5ed9c0634..c5a63f8568c 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg @@ -3355,6 +3355,7 @@ peer-filter PF2 30 match as-range 65000 result accept ! router bfd + slow-timer 5000 interval 900 min-rx 900 multiplier 50 default multihop interval 300 min-rx 300 multiplier 3 local-address 192.168.255.1 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/router-bfd.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/router-bfd.yml index 458c4e9986a..766442189cd 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/router-bfd.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/router-bfd.yml @@ -23,3 +23,4 @@ router_bfd: reflector: min_rx: 600 local_discriminator: 155.1.3.1 + slow_timer: 5000 diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-bfd.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-bfd.md index afa35d99ad5..67993e46d6b 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-bfd.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-bfd.md @@ -30,6 +30,7 @@ | [    reflector](## "router_bfd.sbfd.reflector") | Dictionary | | | | | | [      min_rx](## "router_bfd.sbfd.reflector.min_rx") | Integer | | | | Rate in milliseconds. | | [      local_discriminator](## "router_bfd.sbfd.reflector.local_discriminator") | String | | | | IPv4 address or 32 bit integer. | + | [  slow_timer](## "router_bfd.slow_timer") | Integer | | | Min: 2000
Max: 60000 | Rate in milliseconds. | === "YAML" @@ -80,4 +81,7 @@ # IPv4 address or 32 bit integer. local_discriminator: + + # Rate in milliseconds. + slow_timer: ``` diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-bfd.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-bfd.j2 index 0a5cae85f01..601c5dcc83f 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-bfd.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-bfd.j2 @@ -7,10 +7,13 @@ {% if router_bfd is arista.avd.defined %} ! router bfd -{% if router_bfd.interval is arista.avd.defined and router_bfd.min_rx is arista.avd.defined and router_bfd.multiplier is arista.avd.defined %} +{% if router_bfd.slow_timer is arista.avd.defined %} + slow-timer {{ router_bfd.slow_timer }} +{% endif %} +{% if router_bfd.interval is arista.avd.defined and router_bfd.min_rx is arista.avd.defined and router_bfd.multiplier is arista.avd.defined %} interval {{ router_bfd.interval }} min-rx {{ router_bfd.min_rx }} multiplier {{ router_bfd.multiplier }} default {% endif %} -{% if router_bfd.multihop.interval is arista.avd.defined and router_bfd.multihop.min_rx is arista.avd.defined and router_bfd.multihop.multiplier is arista.avd.defined %} +{% if router_bfd.multihop.interval is arista.avd.defined and router_bfd.multihop.min_rx is arista.avd.defined and router_bfd.multihop.multiplier is arista.avd.defined %} multihop interval {{ router_bfd.multihop.interval }} min-rx {{ router_bfd.multihop.min_rx }} multiplier {{ router_bfd.multihop.multiplier }} {% endif %} {% if router_bfd.local_address is arista.avd.defined %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml index f13012ec9a2..8a8d192cc8b 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml @@ -11907,6 +11907,11 @@ keys: local_discriminator: type: str description: IPv4 address or 32 bit integer. + slow_timer: + description: Rate in milliseconds. + type: int + min: 2000 + max: 60000 router_bgp: type: dict keys: diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/router_bfd.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/router_bfd.schema.yml index ece01b669f9..d4e71c648f9 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/router_bfd.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/router_bfd.schema.yml @@ -81,3 +81,8 @@ keys: local_discriminator: type: str description: IPv4 address or 32 bit integer. + slow_timer: + description: Rate in milliseconds. + type: int + min: 2000 + max: 60000 From 04edebceba18557a9624988218dd0d2252988cf4 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 13 Nov 2024 12:16:11 +0100 Subject: [PATCH 2/3] Feat(eos_cli_config_gen)-Add_bfd_slow_timer_knob --- .../_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml | 2 ++ .../schema/schema_fragments/router_bfd.schema.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml index 8a8d192cc8b..6a0cd9bdb07 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml @@ -11910,6 +11910,8 @@ keys: slow_timer: description: Rate in milliseconds. type: int + convert_types: + - str min: 2000 max: 60000 router_bgp: diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/router_bfd.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/router_bfd.schema.yml index d4e71c648f9..6001da18ae8 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/router_bfd.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/router_bfd.schema.yml @@ -84,5 +84,7 @@ keys: slow_timer: description: Rate in milliseconds. type: int + convert_types: + - str min: 2000 max: 60000 From a14955494b6e75f4f0fefa03d8172c77b7eb97d7 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 13 Nov 2024 14:06:57 +0100 Subject: [PATCH 3/3] Feat(eos_cli_config_gen)-Add_bfd_slow_timer_knob --- .../eos_cli_config_gen/documentation/devices/host1.md | 6 +++++- .../eos_cli_config_gen/intended/configs/host1.cfg | 2 +- .../j2templates/documentation/router-bfd.j2 | 8 ++++++++ .../_eos_cli_config_gen/j2templates/eos/router-bfd.j2 | 6 +++--- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md index 11794a44b31..04a808010cd 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md @@ -5325,6 +5325,10 @@ policy-map type pbr PM_PBR_BREAKOUT ### Router BFD +| BFD Tuning | +| ---------- | +| Slow-Timer 5000 | + #### Router BFD Singlehop Summary | Interval | Minimum RX | Multiplier | @@ -5348,9 +5352,9 @@ policy-map type pbr PM_PBR_BREAKOUT ```eos ! router bfd - slow-timer 5000 interval 900 min-rx 900 multiplier 50 default multihop interval 300 min-rx 300 multiplier 3 + slow-timer 5000 local-address 192.168.255.1 session stats snapshot interval 51 ! diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg index c5a63f8568c..b071df96abb 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg @@ -3355,9 +3355,9 @@ peer-filter PF2 30 match as-range 65000 result accept ! router bfd - slow-timer 5000 interval 900 min-rx 900 multiplier 50 default multihop interval 300 min-rx 300 multiplier 3 + slow-timer 5000 local-address 192.168.255.1 session stats snapshot interval 51 ! diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/router-bfd.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/router-bfd.j2 index 862f0eef87a..93ebbf27628 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/router-bfd.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/router-bfd.j2 @@ -7,6 +7,14 @@ {% if router_bfd is arista.avd.defined %} ### Router BFD +{% if router_bfd.slow_timer is arista.avd.defined %} + +| BFD Tuning | +| ---------- | +{% if router_bfd.slow_timer is arista.avd.defined %} +| Slow-Timer {{ router_bfd.slow_timer }} | +{% endif %} +{% endif %} {% if router_bfd.interval is arista.avd.defined and router_bfd.min_rx is arista.avd.defined and router_bfd.multiplier is arista.avd.defined %} #### Router BFD Singlehop Summary diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-bfd.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-bfd.j2 index 601c5dcc83f..5a4047fe3f9 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-bfd.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-bfd.j2 @@ -7,15 +7,15 @@ {% if router_bfd is arista.avd.defined %} ! router bfd -{% if router_bfd.slow_timer is arista.avd.defined %} - slow-timer {{ router_bfd.slow_timer }} -{% endif %} {% if router_bfd.interval is arista.avd.defined and router_bfd.min_rx is arista.avd.defined and router_bfd.multiplier is arista.avd.defined %} interval {{ router_bfd.interval }} min-rx {{ router_bfd.min_rx }} multiplier {{ router_bfd.multiplier }} default {% endif %} {% if router_bfd.multihop.interval is arista.avd.defined and router_bfd.multihop.min_rx is arista.avd.defined and router_bfd.multihop.multiplier is arista.avd.defined %} multihop interval {{ router_bfd.multihop.interval }} min-rx {{ router_bfd.multihop.min_rx }} multiplier {{ router_bfd.multihop.multiplier }} {% endif %} +{% if router_bfd.slow_timer is arista.avd.defined %} + slow-timer {{ router_bfd.slow_timer }} +{% endif %} {% if router_bfd.local_address is arista.avd.defined %} local-address {{ router_bfd.local_address }} {% endif %}