Skip to content

Commit

Permalink
Update as per the comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Laxmikant Chintakindi authored and Laxmikant Chintakindi committed Jul 29, 2024
1 parent ec6368e commit 1f68379
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.

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 @@ -6672,7 +6672,7 @@ $defs:
type: bool
default: true
description: Non-selectively enabling or disabling redistribution
of connected routes to BGP.
of connected routes to BGP inside the VRF.
bgp_peers:
documentation_options:
table: network-services-vrfs-bgp-settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ $defs:
redistribute_connected:
type: bool
default: true
description: Non-selectively enabling or disabling redistribution of connected routes to BGP.
description: Non-selectively enabling or disabling redistribution of connected routes to BGP inside the VRF.
bgp_peers:
documentation_options:
table: network-services-vrfs-bgp-settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,9 @@ def _router_bgp_vrfs(self: AvdStructuredConfigNetworkServices) -> list | None:

bgp_vrf_redistribute_connected = get(vrf, "redistribute_connected", default=True)
if vrf_name != "default":
bgp_vrf |= {
"router_id": self.shared_utils.router_id,
}
bgp_vrf["router_id"] = self.shared_utils.router_id
if bgp_vrf_redistribute_connected is True:
bgp_vrf |= {
"redistribute_routes": [{"source_protocol": "connected"}],
}
bgp_vrf["redistribute_routes"] = [{"source_protocol": "connected"}]
bgp_vrf_redistribute_static = vrf.get("redistribute_static")
if bgp_vrf_redistribute_static is True or (vrf["static_routes"] and bgp_vrf_redistribute_static is not False):
bgp_vrf.setdefault("redistribute_routes", []).append({"source_protocol": "static"})
Expand Down Expand Up @@ -307,8 +303,9 @@ def _update_router_bgp_vrf_mlag_neighbor_cfg(self: AvdStructuredConfigNetworkSer
"""
In-place update MLAG neighbor part of structured config for *one* VRF under router_bgp.vrfs
"""
if not self._mlag_ibgp_peering_redistribute(vrf, tenant) and get(vrf, "redistribute_connected", default=True):
bgp_vrf["redistribute_routes"][0]["route_map"] = "RM-CONN-2-BGP-VRFS"
if get(vrf, "redistribute_connected", default=True):
if not self._mlag_ibgp_peering_redistribute(vrf, tenant):
bgp_vrf["redistribute_routes"][0]["route_map"] = "RM-CONN-2-BGP-VRFS"

if self.shared_utils.underlay_rfc5549 and self.shared_utils.overlay_mlag_rfc5549:
interface_name = f"Vlan{vlan_id}"
Expand Down

0 comments on commit 1f68379

Please sign in to comment.