-
Notifications
You must be signed in to change notification settings - Fork 0
Description
YANG validation (e.g., must-stmt) sometimes depends on whether a "node exists in the accessible tree".
This creates a cornercase with the default-stmt
container npcon {
leaf A { type string; }
leaf B {
must "../A = 'test1'";
type int32;
default 10;
}
}
The issue is that every server can decide differently whether node /npcon/B is in the accessible tree.
It depends on with-defaults basic-style.
Each basic-style (trim, explicit, report-all) can have a different answer.
For report-all, this example would fail the must-stmt test when the module was loaded.
(Although our server does not do that since it would break some real deployments)
This also affects the 'create' and 'delete' operations in protocol operations.
Solution: not clear if YANG 2.0 can mandate a single behavior or find an alternative
to the 'node exists in the accessible tree' language