Hello, netmod. As part of the ongoing YANG module versioning work, Michal
Vasko created a comprehensive libyang test suite for non-backwards-compatible
(NBC), backwards-compatible (BC), and editorial (ED) changes. I’ve run my
pyang against his suite. Unsurprisingly, there are several commonalities.
However, there were a few deviations. First, the question. Consider this diff:
container cont {
leaf l1 {
type string;
}
- leaf l2 {
- type uint8;
- }
-
container cont2 {
leaf-list ll {
type instance-identifier;
}
}
+
+ leaf l2 {
+ type uint8;
+ }
+
+ leaf l3 {
+ type int8;
+ }
}
Michal asserted that changing the order of data nodes is NBC. The base pyang’s
check-update-from algorithm does not recognize this as NBC. So, my version
reports this as BC. RFC7950 states:
In statements that have any data definition statements as
substatements, those data definition substatements MUST NOT be
reordered. If new data definition statements are added, they can be
added anywhere in the sequence of existing substatements.
But adding a node anywhere in the sequence would change its order. So, which
is the expected output, NBC or BC?
Now, the observation. Michal has a test of a YANG module moving from YANG 1 to
YANG 1.1. He labels that as NBC. While RFC7950 Section 12 describes how the
two versions interact, I think this assertion is correct since an older YANG 1
vendor-bar cannot import a newer YANG 1.1 ietf-foo even if there were no other
schema changes. This means that all IETF modules that have moved from YANG 1
to YANG 1.1 will have a MAJOR YANG Semver update in their histories.
Joe
_______________________________________________
netmod mailing list -- [email protected]
To unsubscribe send an email to [email protected]