Skip to content
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

Yanglint validation issues with the union of identityref #78

Open
italobusi opened this issue Dec 16, 2024 · 3 comments
Open

Yanglint validation issues with the union of identityref #78

italobusi opened this issue Dec 16, 2024 · 3 comments
Assignees
Labels
bug Something isn't working priority-1

Comments

@italobusi
Copy link
Collaborator

When preparing JSON examples (see PR #76 ), the following when statement failed validation with yanglint:

                "derived-from-or-self(../nwi:class,
                'nwi:transceivers-module')";

The issue could have been fixed only by updating the component class definition as:

            leaf class {
              type identityref {
                base ianahw:hardware-class;
              }
              config false;
              mandatory true;
              description
                "The type of the component.";
            }

This issue needs further investigation:

  • is it a yanglint implemenation issue or a bug in the current YANG model?
  • is there any alternative solution to avoid the use of the union type?
@italobusi
Copy link
Collaborator Author

2025-01-08 Base Network Inventory weekly call

Agreed to mark it as priority 1 (changing the data type will be an NBC change)

  • @prmanna ask Netmod WG for some feedbacks about whether is an a yanglint implementation issue or a YANG modelling issue

@prmanna
Copy link

prmanna commented Jan 30, 2025

Raised an issue in libyang for their input.

@italobusi
Copy link
Collaborator Author

2025-01-29 Base Network Inventory weekly call

It seems a tooling issue: if the transceiver-module identity is moved to iana-hardware module the error message no longer appears

  • Prasenjit: check with the yanglint developers

Post Meeting Note: already done in #78 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-1
Projects
None yet
Development

No branches or pull requests

2 participants