Build bgp.advertise lists to simplify configuration templates#3234
Merged
Build bgp.advertise lists to simplify configuration templates#3234
Conversation
This commit builds node- and VRF-level bgp.advertise lists that contain IPv4/IPv6 prefixes that have to be advertised as BGP prefixes. The list is built from interface data (using bgp.advertise attribute) and the bgp.originate node-level list. FRR implementation is included as a proof-of-concept.
There was a problem hiding this comment.
Pull request overview
This PR adds a derived bgp.advertise list at node- and VRF-level to centralize “what prefixes should be originated into BGP” and updates FRR templates/docs to consume that list instead of re-deriving prefixes from interface/originate data.
Changes:
- Build
bgp.advertiselists from interfacebgp.advertiseflags andbgp.originate. - Update FRR BGP templates (global + VRF) to generate
networkstatements frombgp.advertise. - Refresh multiple topology expected outputs and developer docs to reflect the new data model.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/topology/expected/vrf.yml | Expected VRF node data now includes vrfs.*.bgp.advertise lists |
| tests/topology/expected/vrf-routing-blocks.yml | Expected VRF routing-block outputs updated with bgp.advertise |
| tests/topology/expected/vrf-links.yml | Expected VRF link scenarios updated with bgp.advertise |
| tests/topology/expected/vrf-igp.yml | Expected VRF+IGP outputs updated with bgp.advertise |
| tests/topology/expected/mpls-vpn-simple.yml | Expected MPLS/VPN outputs updated with bgp.advertise |
| tests/topology/expected/fabric-ebgp.yml | Expected fabric EBGP outputs updated with bgp.advertise |
| tests/topology/expected/evpn-vlan-attr.yml | Expected EVPN VLAN attribute outputs updated with bgp.advertise |
| tests/topology/expected/evpn-node-vrf.yml | Expected EVPN node VRF outputs updated with bgp.advertise |
| tests/topology/expected/evpn-l3vni-only.yml | Expected EVPN L3VNI-only outputs updated with bgp.advertise |
| tests/topology/expected/evpn-asymmetric-irb-ospf.yml | Expected EVPN asymmetric IRB outputs updated with bgp.advertise |
| tests/topology/expected/components.yml | Expected component test outputs updated with bgp.advertise |
| tests/topology/expected/bgp.yml | Expected base BGP outputs updated with node bgp.advertise |
| tests/topology/expected/bgp-ibgp-localas.yml | Expected iBGP local-as outputs updated with node bgp.advertise |
| tests/topology/expected/bgp-af-rt-929.yml | Expected AF regression outputs updated with node bgp.advertise |
| netsim/modules/bgp.py | Adds bgp_build_advertise_list and wires it into BGP post-transform |
| netsim/ansible/templates/vrf/frr.bgp.j2 | Switches VRF network statements to use vdata.bgp.advertise |
| netsim/ansible/templates/bgp/frr.j2 | Switches global network statements to use bgp.advertise |
| docs/dev/config/bgp.md | Updates template author guidance to use the new bgp.advertise lists |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit builds node- and VRF-level bgp.advertise lists that contain IPv4/IPv6 prefixes that have to be advertised as BGP prefixes. The list is built from interface data (using bgp.advertise attribute) and the bgp.originate node-level list.
FRR implementation is included as a proof-of-concept.