-
Notifications
You must be signed in to change notification settings - Fork 713
Add prefix-set description and prefix entry sequence/action #1524
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -92,7 +92,14 @@ module openconfig-routing-policy { | |
| default value for the default-(import|export)-policy leaf must be | ||
| applied. See RFC6020 7.6.1 which applies to this model."; | ||
|
|
||
| oc-ext:openconfig-version "3.5.0"; | ||
| oc-ext:openconfig-version "3.6.0"; | ||
|
|
||
| revision "2026-07-22" { | ||
| description | ||
| "Add prefix-set description and prefix entry sequence-number and | ||
| action leaves to support ordered BGP-style prefix lists."; | ||
| reference "3.6.0"; | ||
| } | ||
|
|
||
| revision "2024-11-26" { | ||
| description | ||
|
|
@@ -224,6 +231,22 @@ module openconfig-routing-policy { | |
|
|
||
| // grouping statements | ||
|
|
||
| typedef prefix-set-prefix-action-type { | ||
| type enumeration { | ||
| enum PERMIT { | ||
| description | ||
| "Permit routes that match the prefix entry."; | ||
| } | ||
| enum DENY { | ||
| description | ||
| "Deny routes that match the prefix entry."; | ||
| } | ||
| } | ||
| default PERMIT; | ||
| description | ||
| "Action to take for routes matching a prefix list entry."; | ||
| } | ||
|
|
||
| grouping prefix-set-config { | ||
| description | ||
| "Configuration data for prefix sets used in policy | ||
|
|
@@ -261,6 +284,12 @@ module openconfig-routing-policy { | |
| prefix sets to be of only one address family."; | ||
| } | ||
|
|
||
| leaf description { | ||
| type string; | ||
| description | ||
| "Optional human-readable description of the prefix set."; | ||
| } | ||
|
|
||
| } | ||
|
|
||
| grouping prefix-set-state { | ||
|
|
@@ -345,6 +374,26 @@ module openconfig-routing-policy { | |
| prefix: 10.3.192.0/21, | ||
| masklength-range: exact"; | ||
| } | ||
|
|
||
| leaf sequence-number { | ||
| type uint32 { | ||
| range "1..4294967295"; | ||
| } | ||
| description | ||
| "Sequence number for the prefix entry within the prefix set. | ||
| Prefix list implementations evaluate entries in ascending | ||
| sequence order. The list key for prefix entries remains | ||
| ip-prefix and masklength-range; sequence-number is an | ||
| additional attribute used by implementations that require | ||
| explicit ordering or permit/deny semantics per entry."; | ||
| } | ||
|
|
||
| leaf action { | ||
| type prefix-set-prefix-action-type; | ||
| description | ||
| "Action applied to routes matching this prefix entry within | ||
| the prefix set."; | ||
| } | ||
|
Comment on lines
+391
to
+396
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding Historically, a prefix-set was a simple unordered set of prefixes used for matching (i.e.,
To ensure consistent implementation across different platforms, the description of the |
||
| } | ||
|
|
||
| grouping prefix-state { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since
sequence-numberis an optional leaf, the model should clarify the expected behavior when it is omitted for some or all entries in a prefix-set.For example:
Specifying this behavior in the description will prevent vendor-specific discrepancies.