Skip to content

Use prefixsets in routing.prefix lists - #3845

Open
ipspace wants to merge 2 commits into
devfrom
pfx-list-prefixset
Open

Use prefixsets in routing.prefix lists#3845
ipspace wants to merge 2 commits into
devfrom
pfx-list-prefixset

Conversation

@ipspace

@ipspace ipspace commented Sep 1, 2026

Copy link
Copy Markdown
Owner

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

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 in expand_prefix_list assigns 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_list with 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 }
Comment thread docs/module/routing-prefix.txt Outdated
Comment thread docs/module/routing-prefix.txt Outdated
Comment thread netsim/modules/routing/prefix.py Outdated
@ipspace
ipspace requested a review from DanPartelly September 1, 2026 15:45
@ipspace

ipspace commented Sep 1, 2026

Copy link
Copy Markdown
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants