Skip to content

yang: Duplicate choice name in frr-filter.yang#22503

Merged
mjstapp merged 1 commit into
FRRouting:masterfrom
y-bharath14:srib-yang-Ver20
Jul 1, 2026
Merged

yang: Duplicate choice name in frr-filter.yang#22503
mjstapp merged 1 commit into
FRRouting:masterfrom
y-bharath14:srib-yang-Ver20

Conversation

@y-bharath14

Copy link
Copy Markdown
Contributor

Duplicate choice name in frr-filter.yang

frr-filter.yang:280: error: there is already a child node to "entry" at frr-filter.yang:181 with the name "style" defined at frr-filter.yang:201
frr-filter.yang:299: error: there is already a child node to "entry" at frr-filter.yang:181 with the name "standard-value" defined at frr-filter.yang:219
frr-filter.yang:330: error: there is already a child node to "entry" at frr-filter.yang:181 with the name "extended-value" defined at frr-filter.yang:249

Duplicate choice name in frr-filter.yang

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
@greptile-apps

greptile-apps Bot commented Jun 29, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes a YANG schema validation error in frr-filter.yang where three choice nodes inside the ipv6-prefix case shared the same names (style, standard-value, extended-value) as identically-named choice nodes in the sibling ipv4-prefix case, violating the YANG requirement that all children of a node have unique names.

  • Renames choice stylechoice ipv6-style, choice standard-valuechoice ipv6-standard-value, and choice extended-valuechoice ipv6-extended-value within the ipv6-prefix case.
  • The fix is safe: YANG choice names are transparent in instance data paths (XPath does not traverse choice names), so no existing configurations, augment statements, or C handler paths are affected.

Confidence Score: 5/5

Safe to merge — the three renames fix a hard schema-validation error and do not touch any instance data paths or C handler code.

The change is a minimal, targeted rename of three YANG choice identifiers. Because YANG choice names are opaque to XPath and do not appear in instance data paths, no existing configurations, augments, deviations, or C handler code is affected. No other files in the repository reference these choice names.

No files require special attention.

Important Files Changed

Filename Overview
yang/frr-filter.yang Renames three duplicate choice identifiers in the ipv6-prefix case to add an ipv6- prefix, resolving YANG schema compilation errors without affecting instance data paths.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[list entry] --> B[choice value]
    B --> C[case ipv4-prefix\nwhen type='ipv4']
    B --> D[case ipv6-prefix\nwhen type='ipv6']
    B --> E[case mac]
    B --> F[case any]

    C --> G[choice style]
    G --> H[case zebra\nipv4-prefix leaf]
    G --> I[case cisco]
    I --> J[choice standard-value\nhost / network / source-any]
    I --> K[choice extended-value\ndestination-host / destination-network / destination-any]

    D --> L["choice ipv6-style (was: style)"]
    L --> M[case zebra\nipv6-prefix leaf]
    L --> N[case cisco]
    N --> O["choice ipv6-standard-value\n(was: standard-value)"]
    N --> P["choice ipv6-extended-value\n(was: extended-value)"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[list entry] --> B[choice value]
    B --> C[case ipv4-prefix\nwhen type='ipv4']
    B --> D[case ipv6-prefix\nwhen type='ipv6']
    B --> E[case mac]
    B --> F[case any]

    C --> G[choice style]
    G --> H[case zebra\nipv4-prefix leaf]
    G --> I[case cisco]
    I --> J[choice standard-value\nhost / network / source-any]
    I --> K[choice extended-value\ndestination-host / destination-network / destination-any]

    D --> L["choice ipv6-style (was: style)"]
    L --> M[case zebra\nipv6-prefix leaf]
    L --> N[case cisco]
    N --> O["choice ipv6-standard-value\n(was: standard-value)"]
    N --> P["choice ipv6-extended-value\n(was: extended-value)"]
Loading

Reviews (1): Last reviewed commit: "yang: Duplicate choice name in frr-filte..." | Re-trigger Greptile

@y-bharath14

Copy link
Copy Markdown
Contributor Author

ci:rerun

@mjstapp mjstapp 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.

the yang model change looks fine, but there aren't any corresponding changes to the filter northbound code. are these attributes just not implemented currently?

@vayetze vayetze requested a review from choppsv1 June 30, 2026 15:28
@y-bharath14

Copy link
Copy Markdown
Contributor Author

the yang model change looks fine, but there aren't any corresponding changes to the filter northbound code. are these attributes just not implemented currently?

Hello @mjstapp ,

No northbound code changes are needed here. This PR only renames the 'choice' identifiers to fix duplicate choice name errors in the YANG model.
'choice' names are not part of XPaths — the northbound callbacks reference to the leaf/container names, which were not changed by this PR.
All of these attributes are already fully implemented in the northbound code, so no corresponding changes are required.

Thanks & Regards,
Bharath

@mjstapp

mjstapp commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for the explanation

the yang model change looks fine, but there aren't any corresponding changes to the filter northbound code. are these attributes just not implemented currently?

Hello @mjstapp ,

No northbound code changes are needed here. This PR only renames the 'choice' identifiers to fix duplicate choice name errors in the YANG model. 'choice' names are not part of XPaths — the northbound callbacks reference to the leaf/container names, which were not changed by this PR. All of these attributes are already fully implemented in the northbound code, so no corresponding changes are required.

Thanks & Regards, Bharath

@mjstapp mjstapp merged commit 697d68e into FRRouting:master Jul 1, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants