Use prefixsets in routing.prefix lists - #3845
Open
ipspace wants to merge 2 commits into
Open
Conversation
Includes: * Modified prefix list processing, expanding 'prefix' attribute into lists of ipv4/ipv6 prefixes, and allowing lists in ipv4, ipv6, and pool attributes. * Modified transformation- and error tests * Updated documentation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
List-valued prefixes currently produce invalid SR Linux and IOS XR configurations, and several documentation examples are inaccurate.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Extends routing prefix lists to support generic prefix sets and multiple prefixes per entry.
Changes:
- Expands prefix sets into address-family-specific entries.
- Updates schemas and transformation/error tests.
- Documents generic prefix syntax and sequence generation.
File summaries
| File | Description |
|---|---|
netsim/modules/routing/prefix.py |
Implements prefix expansion and resequencing. |
netsim/modules/routing.yml |
Makes prefix attributes list-valued. |
tests/topology/input/rp-prefix-expansion.yml |
Adds multi-prefix expansion scenarios. |
tests/topology/expected/rp-prefix-expansion.yml |
Updates expected transformed topology. |
tests/errors/prefix-list-min-max.log |
Updates validation diagnostics. |
docs/module/routing-prefix.txt |
Documents expanded prefix lists. |
docs/module/routing-advanced.txt |
Centralizes generic-prefix documentation. |
docs/module/routing-acl.txt |
Removes duplicated generic-prefix details. |
Review details
Suppressed comments (2)
docs/module/routing-prefix.txt:85
- This is the first IPv6 item in
p2, so the per-address-family sequence reset inexpand_prefix_listassigns 100 rather than 110.
ipv6 prefix-list p2-ipv6 seq 110 permit 2001:db8:0:2::/64
docs/module/routing-prefix.txt:87
- Empty address-family lists are still created by
create_empty_prefix_listwith sequence 10, so this documented generated command should not use 100.
ipv6 prefix-list p3-ipv6 seq 100 deny ::/0
- Files reviewed: 7/8 changed files
- Comments generated: 4
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+203
to
+205
| ipv4: | ||
| type: list | ||
| _subtype: { type: ipv4, use: prefix } |
Owner
Author
|
@DanPartelly -- Reusing the "prefixset" introduced in ACLs for prefix lists. Next one: static routes ;) |
ipspace
added a commit
that referenced
this pull request
Sep 1, 2026
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.
Includes: