Skip to content

Commit

Permalink
Fix(eos_cli_config_gen): Fix the maximum-routes, next-hop resolution …
Browse files Browse the repository at this point in the history
…v4-mapped-v6 translation commands in `router_bgp.address_family_ipv4_labeled_unicast` (#4567)
  • Loading branch information
MaheshGSLAB authored Oct 10, 2024
1 parent e8b9451 commit 20e7ff1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 39 deletions.

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

21 changes: 2 additions & 19 deletions python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-bgp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,7 @@ router bgp {{ router_bgp.as }}
neighbor {{ peer.name }} next-hop-self source-interface {{ peer.next_hop_self_source_interface }}
{% endif %}
{% if peer.maximum_advertised_routes is arista.avd.defined %}
{% set maximum_routes_cli = "neighbor " ~peer.name ~ " maximum-routes " ~peer.maximum_advertised_routes %}
{% set maximum_routes_cli = "neighbor " ~ peer.name ~ " maximum-advertised-routes " ~ peer.maximum_advertised_routes %}
{% if peer.maximum_advertised_routes_warning_limit is arista.avd.defined %}
{% set maximum_routes_cli = maximum_routes_cli ~ " warning-limit " ~ peer.maximum_advertised_routes_warning_limit %}
{% endif %}
Expand Down Expand Up @@ -1546,11 +1546,6 @@ router bgp {{ router_bgp.as }}
{% if peer.multi_path is arista.avd.defined(true) %}
neighbor {{ peer.name }} multi-path
{% endif %}
{% if peer.next_hop_resolution.v4_mapped_v6_translation is arista.avd.defined(true) %}
neighbor {{ peer.name }} next-hop resolution v4-mapped-v6 translation
{% elif peer.next_hop_resolution.v4_mapped_v6_translation is arista.avd.defined(false) %}
neighbor {{ peer.name }} next-hop resolution v4-mapped-v6 translation disabled
{% endif %}
{% endfor %}
{% for neighbor in router_bgp.address_family_ipv4_labeled_unicast.neighbors | arista.avd.natural_sort('ip_address') %}
{% if neighbor.activate is arista.avd.defined(true) %}
Expand Down Expand Up @@ -1604,7 +1599,7 @@ router bgp {{ router_bgp.as }}
neighbor {{ neighbor.ip_address }} next-hop-self source-interface {{ neighbor.next_hop_self_source_interface }}
{% endif %}
{% if neighbor.maximum_advertised_routes is arista.avd.defined %}
{% set maximum_routes_cli = "neighbor " ~neighbor.ip_address ~ " maximum-advertised-routes " ~neighbor.maximum_advertised_routes %}
{% set maximum_routes_cli = "neighbor " ~ neighbor.ip_address ~ " maximum-advertised-routes " ~ neighbor.maximum_advertised_routes %}
{% if neighbor.maximum_advertised_routes_warning_limit is arista.avd.defined %}
{% set maximum_routes_cli = maximum_routes_cli ~ " warning-limit " ~ neighbor.maximum_advertised_routes_warning_limit %}
{% endif %}
Expand Down Expand Up @@ -1639,11 +1634,6 @@ router bgp {{ router_bgp.as }}
{% if neighbor.multi_path is arista.avd.defined(true) %}
neighbor {{ neighbor.ip_address }} multi-path
{% endif %}
{% if neighbor.next_hop_resolution.v4_mapped_v6_translation is arista.avd.defined(true) %}
neighbor {{ neighbor.ip_address }} next-hop resolution v4-mapped-v6 translation
{% elif neighbor.next_hop_resolution.v4_mapped_v6_translation is arista.avd.defined(false) %}
neighbor {{ neighbor.ip_address }} next-hop resolution v4-mapped-v6 translation disabled
{% endif %}
{% endfor %}
{% if router_bgp.address_family_ipv4_labeled_unicast.networks is arista.avd.defined %}
{% for network in router_bgp.address_family_ipv4_labeled_unicast.networks %}
Expand Down Expand Up @@ -2116,13 +2106,6 @@ router bgp {{ router_bgp.as }}
{% endif %}
{{ redistribute_ospfv3_match }}
{% endif %}
{% if redistribute_var.rip.enabled is arista.avd.defined(true) %}
{% set redistribute_rip = "redistribute rip" %}
{% if redistribute_var.rip.route_map is arista.avd.defined %}
{% set redistribute_rip = redistribute_rip ~ " route-map " ~ redistribute_var.rip.route_map %}
{% endif %}
{{ redistribute_rip }}
{% endif %}
{% if redistribute_var.static.enabled is arista.avd.defined(true) %}
{% set redistribute_static = "redistribute static" %}
{% if redistribute_var.static.include_leaked is arista.avd.defined(true) %}
Expand Down

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 @@ -2085,9 +2085,10 @@ keys:
type: bool
next_hop_resolution:
type: dict
keys:
v4_mapped_v6_translation:
type: bool
deprecation:
warning: true
removed: true
remove_in_version: 5.0.0
next_hop_self:
type: bool
next_hop_self_source_interface:
Expand Down Expand Up @@ -2200,9 +2201,10 @@ keys:
type: bool
next_hop_resolution:
type: dict
keys:
v4_mapped_v6_translation:
type: bool
deprecation:
warning: true
removed: true
remove_in_version: 5.0.0
next_hop_self:
type: bool
next_hop_self_source_interface:
Expand Down

0 comments on commit 20e7ff1

Please sign in to comment.