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

Feat(eos_designs): Exclude l3_edge neighbors from peer_group #4491

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def router_bgp(self: AvdStructuredConfigCoreInterfacesAndL3Edge) -> dict | None:
neighbors = []
neighbor_interfaces = []
for p2p_link in self._filtered_p2p_links:
if p2p_link.get("include_in_underlay_protocol", True) is not True:
if p2p_link.get("include_in_underlay_protocol", True) is not True and p2p_link.get("routing_protocol") != "ebgp":
continue

if p2p_link["data"]["bgp_as"] is None or p2p_link["data"]["peer_bgp_as"] is None:
Expand All @@ -42,9 +42,12 @@ def router_bgp(self: AvdStructuredConfigCoreInterfacesAndL3Edge) -> dict | None:
"remote_as": p2p_link["data"]["peer_bgp_as"],
"peer": p2p_link["data"]["peer"],
"description": p2p_link["data"]["peer"],
"peer_group": self.shared_utils.bgp_peer_groups["ipv4_underlay_peers"]["name"],
}

# Set peer group only if include_in_underlay_protocol is True
if p2p_link.get("include_in_underlay_protocol", True):
neighbor["peer_group"] = self.shared_utils.bgp_peer_groups["ipv4_underlay_peers"]["name"]

# RFC5549
if self.shared_utils.underlay_rfc5549 and p2p_link.get("routing_protocol") != "ebgp":
neighbor_interfaces.append({"name": p2p_link["data"]["interface"], **neighbor})
Expand Down
Loading