Subject: [netmod] Definitions of YANG schema and Packages (in packages draft) - Issue #74

From: "Sterne, Jason (Nokia - CA/Ottawa)" <[email-masked]>
Date: Thu, 6 Jan 2022 21:41:43 +0000

Hi all,

This email is related to the items (a) and (c) in Issue #74 of the YANG versioning work:
https://github.com/netmod-wg/yang-ver-dt/issues/74

========================================================
First some background:

"YANG schema" is not defined in RFC7950 or 8342 (NMDA).

8342 defines the following:

   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.

7950 defines the following:

   o  schema node: A node in the schema tree.  One of action, container,
      leaf, leaf-list, list, choice, case, rpc, input, output,
      notification, anydata, and anyxml.

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

========================================================
Some current definitions in YANG Packages 02 https://datatracker.ietf.org/doc/draft-ietf-netmod-yang-packages/

Abstract

   This document defines YANG packages, a versioned organizational
   structure holding a set of related YANG modules that collectively
   define a YANG schema.

Section 1:

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

   *  YANG package: An organizational structure containing a collection
      of YANG modules, normally defined in a YANG instance data file.  A
      YANG package defines a YANG schema by specifying a set of YANG
      modules and their revisions, other packages and their revisions,
      mandatory features, and deviations.  YANG packages are defined in
      Section 5.

Section 2:

   A YANG package is an organizational structure that groups a set of
   YANG modules together into a consistent versioned definition.

Section 5:

   A YANG package is a versioned organizational structure defining a set
   of related YANG modules, packages, features, and deviations.  A YANG
   package collectively defines a YANG schema.

========================================================
Proposed updates to the packages draft (changes highlighted in red)
- unify the short description of a package in the 4 places (don't try to include all details of a package in this short description)
- but do we need more than this short description in the abstract and sections 1 and 2 ?
- do we even need a term called "YANG Schema" ?

Abstract

   This document defines YANG packages: a versioned organizational
   structure defining a set of YANG modules, features, and deviations.

Section 1:

   This document also makes of the following terminology introduced in
   the YANG 1.1 Data Modeling Language [RFC7950]:

   *  data node

   *  schema node

   In addition, this document defines the following terminology:

  * YANG schema: The combined set of schema nodes for a set of modules, taking into consideration any deviations and enabled features.

   * YANG package: A versioned organizational structure defining a set of YANG modules, features, and deviations.  A YANG package collectively defines a YANG schema.
- leave out "normally defined in a YANG instance data file"
- leave out "other packages and their revisions"
- leave out "submodules"
- leave out anything about mount points
- "set" vs "collection" vs "groups" vs "holding" of YANG modules:   use "set" of YANG modules

Section 2:

   A YANG package is a versioned organizational structure defining a set of YANG modules, features, and deviations.  For
   example, a YANG package could define the set of YANG modules required
   to implement an L2VPN service on a network device.  YANG packages can
   themselves refer to, and reuse, other package definitions.
[or add mentions of included packages and mount points here in section 2 ? section 1? abstract ?]

Section 5:

   A YANG package is a versioned organizational structure defining a set
   of related YANG modules, packages, features, and deviations.  A YANG
   package collectively defines a YANG schema.

Jason

---

From: Jürgen Schönwälder <[email-masked]>
Date: Thu, 6 Jan 2022 23:09:22 +0100

Perhaps it is best to avoid defining the term 'YANG schema', in
particular if it is the same as the schema implied by a YANG package,
which I would call a "package schema". I assume that a datastore can
support multiple packages (not sure, but there is text about "the
union of a set of compatible packages" in the YANG packages I-D) and
hence a 'datastore schema' is a composition of one or more "package
schema".

Perhaps the term "YANG schema" should be left as an opaque name for
any kind of schema, i.e., any of "datastore schema", "package schema",
"TBD schema". I think we carefully avoided using "YANG schema" during
the NMDA and YANG library update work. It might be good if the
packages work also avoids allocating that term - and using "package
schema" and 'datastore schema' may actually help to avoid confusion.

/js

> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Jürgen Schönwälder              Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>

---

From: "Sterne, Jason (Nokia - CA/Ottawa)" <[email-masked]>
Date: Fri, 7 Jan 2022 22:37:26 +0000

Thanks Jürgen.

That might be a good idea to be more specific (i.e. "package schema").  It would result in statements like this in the Packages draft:

YANG package: A versioned organizational structure holding a set of related YANG modules that collectively define a YANG package schema.

package schema: The combined set of schema nodes defined by a YANG package. A datastore schema can be a composition of one or more package schema.

   *  To allow YANG datastore schema to be specified in a concise way rather than…

   1.  A YANG package MAY represent a complete YANG datastore schema or only part of a YANG datastore schema with some module import dependencies missing, as described in Section 5.4.

Jason

> -----Original Message-----

> From: Jürgen Schönwälder <[email-masked]>

> Sent: Thursday, January 6, 2022 5:09 PM

> To: Sterne, Jason (Nokia - CA/Ottawa) <[email-masked]>

> Cc: [email-masked]

> Subject: Re: [netmod] Definitions of YANG schema and Packages (in packages

> draft) - Issue #74

> On Thu, Jan 06, 2022 at 09:41:43PM +0000, Sterne, Jason (Nokia - CA/Ottawa)

> wrote:

> > This email is related to the items (a) and (c) in Issue #74 of the YANG

> versioning work:

> > Some current definitions in YANG Packages 02

> https://datatracker.ietf.org/doc/draft-ietf-netmod-yang-packages/

> >    *  YANG schema:  A datastore schema, not bound to any particular

> datastore.

> > - unify the short description of a package in the 4 places (don't try to include

> all details of a package in this short description)

> > - but do we need more than this short description in the abstract and

> sections 1 and 2 ?

> >   * YANG schema: The combined set of schema nodes for a set of modules,

> taking into consideration any deviations and enabled features.

> >    * YANG package: A versioned organizational structure defining a set of

> YANG modules, features, and deviations.  A YANG package collectively defines

> a YANG schema.

> > - "set" vs "collection" vs "groups" vs "holding" of YANG modules:   use "set"

> of YANG modules

> >    A YANG package is a versioned organizational structure defining a set of

> YANG modules, features, and deviations.  For

> > [or add mentions of included packages and mount points here in section 2 ?

> section 1? abstract ?]

> > [email-masked]<mailto:[email-masked]>

---

From: "Sterne, Jason (Nokia - CA/Ottawa)" <[email-masked]>
Date: Fri, 21 Jan 2022 00:45:39 +0000

After some discussions on the weekly calls, we are going to avoid defining "YANG schema".  We'll roll the following terms into the next version of the draft:

Abstract:

   This document defines YANG packages; a versioned organizational
   structure used to manage schema and conformance of YANG modules as a
   cohesive set instead of individually.

Terminology:

   o  YANG package: a versioned organizational structure used to manage
      a set of YANG modules that collectively define a package schema.
      YANG packages are defined in Section 5.

   o  package schema: The combined set of schema nodes defined by a YANG
      package.  Package schema can be used to define datastore schema.

Rgds,
Jason

From: Sterne, Jason (Nokia - CA/Ottawa)
Sent: Friday, January 7, 2022 5:37 PM
To: Juergen Schoenwaelder <[email-masked]>
Cc: [email-masked]
Subject: RE: [netmod] Definitions of YANG schema and Packages (in packages draft) - Issue #74

Thanks Jürgen.

Jason

> From: Jürgen Schönwälder <[email-masked]<mailto:[email-masked]>>

> To: Sterne, Jason (Nokia - CA/Ottawa) <[email-masked]<mailto:[email-masked]>>

> Cc: [email-masked]<mailto:[email-masked]>