Open kwatsen opened 5 years ago
+1 on clarifying the behavior of NP-containers, although some of this clarification might need to be in future protocol drafts rather than the base YANG spec.
Another ambiguity regarding NP-containers in the NETMOD mailing list:
One option that may be worth considering is to get rid of the distinction between P and NP altogether, with these two additional rules:
Here is another thread related to this issue
Personally I think that the distinction is useful and makes sense. But I think that the YANG and protocol specifications should put more constraints on how the servers are expected to behave.
However, I do find the XPath context definition confusing/inconsistent with the np-containers not really existing:
If a node that exists in the accessible tree has a non-presence
container as a child, then the non-presence container also exists in
the accessible tree.
I think current lifecycle (as implied by RFC7950) is very much consistent and I do not believe it should be changed. They are extremely useful for pruning data tree parts which have no semantic meaning, as well as anchoring enforcement points for things like MUST constraints.
I believe access protocols (i.e. NETCONF/RESTCONF) should instead be clarified to explicitly define lifecycle rules for NP containers.
Related, the list
and leaf-list
nodes are similarly unclear as to if they exist when empty.
Somewhat related,list
and leaf-list
are also unclear as to if the list exists when empty.
Regarding Lada's "must constraints on a container become effective only after the container instance is created", this is root issue for why I add presence
statements in models with mandatory descendents like this:
presence
"Blah, blah, blah.
This statement is present so the mandatory descendant
nodes do not imply that this node must be configured.";
NP containers have caused a lot of confusion and support tickets.
Maybe the protocol documents need to be clarified how NP containers work, not YANG.
Must do: complexity: medium, bc: medium, importance: high
Searching the NETCONF list archives for the word "non-presense" found the following: