Skip to content

Fix yanglint schema warnings#1436

Open
rgwilton wants to merge 3 commits intoopenconfig:masterfrom
rgwilton:fix-yanglint
Open

Fix yanglint schema warnings#1436
rgwilton wants to merge 3 commits intoopenconfig:masterfrom
rgwilton:fix-yanglint

Conversation

@rgwilton
Copy link
Copy Markdown
Contributor

Change Scope

  • Fixing yanglint warnings (there were no warnings after this run).
  • I've marked all of these as bugfixes. In theory the changes are not backwards compatible, but generally the YANG would have been broken previously, so ...

Platform Implementations

  • N/A. No new nodes added or removed.

Tree View

  • N/A. No changes to the tree have occurred.

The change involve:

  • Adding the module prefix for when identities are referenced in when statements (YANG 1.1 requires this, but I suspect that these may be broken when evaluating when expressions for YANG 1).
  • Removing module prefixes for enum values used in when expressions (these are just broken).
  • Correcting some typos (e.g., TE_LINK_MAXIUMUM_RESERVABLE_BANDWIDTH => TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH)
  • Deleting references to IPV4_ADDRESS_INDEX and IPV6_ADDRESS_INDEX which are not defined as identities.
  • I've also fixed up some references in authz, pathz, certz, credz where the paths don't appear to be correct. I've not convinced that the paths are necessarily correct after my changes (but they were more correct that before and I'm not an xpath expert).

@rgwilton
Copy link
Copy Markdown
Contributor Author

@dplore, tagging Darren because you may be interested in this.

Copy link
Copy Markdown
Contributor

@earies earies left a comment

Choose a reason for hiding this comment

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

+1 for this cleanup - thx @rgwilton .... we did similar long back as we ran into them but don't believe the model set was swept and likely more of these were added over time.

I think patch version ++ is acceptable here as prior was likely just danced around and possibly not working as expected in various uses.

the type of match criteria, e.g., MAC layer, IPv4, IPv6, etc.";

oc-ext:openconfig-version "1.3.3";
oc-ext:openconfig-version "1.3.4";
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.

nit: add blank line

@jsterne
Copy link
Copy Markdown

jsterne commented Feb 11, 2026

Should more validation be added to the CI pipeline of OC models to prevent these types of issues from creeping back in? (e.g. adding libyang/yanglint)

@rgwilton
Copy link
Copy Markdown
Contributor Author

Should more validation be added to the CI pipeline of OC models to prevent these types of issues from creeping back in? (e.g. adding libyang/yanglint)

Yes, I think that would be great if that could be added. Particularly because some operator tool chains are relying on these validating cleanly.

@dplore
Copy link
Copy Markdown
Member

dplore commented Feb 23, 2026

/gcbrun

@OpenConfigBot
Copy link
Copy Markdown

No major YANG version changes in commit f865765

@dplore dplore moved this to Ready to discuss in OC Operator Review Mar 5, 2026

container ipv4 {
when "../state/type = 'oc-aftt:IPV4'";
when "../state/type = 'IPV4'";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this prefix removed where it is being added elsewhere? Is this intended?

description
"Removal of references to unused/removed LLDP groupings";
reference "1.12.0";
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks like a typo? This should not be deleted.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is probably the source of most if not all of the failing CI checks for this PR.

@dplore dplore moved this from Ready to discuss to In Progress in OC Operator Review Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

5 participants