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

how to process the groupings or typedefs in schema comparison #197

Open
lllyfeng opened this issue Feb 13, 2023 · 1 comment
Open

how to process the groupings or typedefs in schema comparison #197

lllyfeng opened this issue Feb 13, 2023 · 1 comment
Labels
schema-comparison Issues related to the YANG schema comparison draft

Comments

@lllyfeng
Copy link

we can presume a grouping or a typedef is defined in one module, and this defintion is referenced by another module, if this definition has a nbc change, should all statements which reference this defiintion be nbc change?

For example:
module a {
revision-label "1.0.0";
typedef type1 {
type uint32 {
range 1..100;
}
}
}

And
module b {
import a;

container b {
leaf c {
type a:type1;
}
}
}

if module a change the type1's range to 1..50, the leaf c in module b should also have the nbc change?
if yes, the module b have no any text change, how to express this change?
if no, the scope of leaf c is reduced actually.

@jsterne
Copy link
Collaborator

jsterne commented Feb 13, 2023

Since module B did not have any changes, module B itself would not have any indications of an NBC change (there would not be a new version of module B created with a rev:non-backwards-compatible extension).

But if both module a and module b are part of a set of modules being compared (against other revisions of a and b) with a schema comparison tool, then the tool should point out the NBC change. IMO the tool should report:

  1. the NBC change against each leaf that uses the typedef, and
  2. the NBC change against the typedef itself

@avtobiff avtobiff added the schema-comparison Issues related to the YANG schema comparison draft label Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
schema-comparison Issues related to the YANG schema comparison draft
Projects
None yet
Development

No branches or pull requests

3 participants