netmod-wg / yang-next

Feature requests for future versions of YANG
6 stars 0 forks source link

Clarify definitions of YANG schema tree, vs module schema tree #96

Open rgwilton opened 4 years ago

rgwilton commented 4 years ago

The following errata was proposed (but likely rejected) for RFC 7950:

Original Text

o schema tree: The definition hierarchy specified within a module.

Corrected Text

o schema tree: The hierarchy of schema nodes defined in the set of all modules implemented by a server, as specified in the YANG library data [RFC7895].


Often there is a requirement to refer the entire schema, taking into account all modules, deviations and features. Sometimes that schema is in the context of a datastore, at other times it applies more widely, e.g. a schema that is the superset of the schema from all configuration datastores, from RFC 8342:

The datastore schema for MUST be a superset of the combined datastore schema used in all configuration datastores, except that configuration data nodes supported in a configuration datastore MAY be omitted from if a server is not able to accurately report them.

It is also worth noting that RFC 8342 also defines:

o schema node: A node in the schema tree. The formal definition is provided in RFC 7950.

o datastore schema: The combined set of schema nodes for all modules supported by a particular datastore, taking into consideration any deviations and enabled features for that datastore.

The latest version of the packages draft (not posted yet, just an individual draft), defines:

o YANG schema: A datastore schema, not bound to any particular datastore.

In the next revision of the YANG, we should check if there are definitions that should be clarified and updated. Possibly some of the definitions from RFC 8342 should be pulled into an updated version of RFC 7950.

There has also been some discussion on the NETMOD alias under a thread with the title "[netmod] [Technical Errata Reported] RFC7950 (5879)".

abierman commented 1 week ago

I think the schema tree already includes augmented nodes. OK to terminology correction. The intro should be clear that YANG library contents needed to produce the same schema tree in 2 programs