Re: [netmod] WG Last Call: draft-ietf-netmod-schema-mount-07

Ladislav Lhotka <> Mon, 13 November 2017 03:19 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 160C51293F2 for <>; Sun, 12 Nov 2017 19:19:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id aEQvSfgzMQTy for <>; Sun, 12 Nov 2017 19:19:43 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 3F4C41293F5 for <>; Sun, 12 Nov 2017 19:19:43 -0800 (PST)
Received: by (Postfix, from userid 109) id 74D8C18215DD; Mon, 13 Nov 2017 04:18:37 +0100 (CET)
Received: from localhost ( []) by (Postfix) with ESMTPSA id 73E171820F76; Mon, 13 Nov 2017 04:18:33 +0100 (CET)
From: Ladislav Lhotka <>
To: Juergen Schoenwaelder <>, Robert Wilton <>, "netmod\" <>
In-Reply-To: <20171110160836.2hy5nr4zuklwnjjj@elstar.local>
References: <> <> <> <> <> <> <20171109181638.zel2otpzrptggvwz@elstar.local> <> <20171110160836.2hy5nr4zuklwnjjj@elstar.local>
Mail-Followup-To: Juergen Schoenwaelder <>, Robert Wilton <>, "netmod\" <>
Date: Mon, 13 Nov 2017 11:20:44 +0800
Message-ID: <>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <>
Subject: Re: [netmod] WG Last Call: draft-ietf-netmod-schema-mount-07
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 13 Nov 2017 03:19:46 -0000

Juergen Schoenwaelder <> writes:

> On Fri, Nov 10, 2017 at 04:39:36PM +0100, Ladislav Lhotka wrote:
>> >
>> > So what is the difference between "schema tree" and "schema"? Or to
>> > put it differently, what is "all associated semantics" that you are
>> > adding to a "schema tree" to obtain a "schema"? RFC 7950 says:
>> >
>> >    o  schema tree: The definition hierarchy specified within a module.
>> As Rob points out, this is probably incorrect, as schema tree should
>> involve multiple modules. It makes no sense to talk about a schema tree
>> of an augmenting module unless we also take into account the augmented
>> module.
>> Anyway, schema tree is really just the hierarchy, i.e. a tree of schema
>> nodes, whereas schema is the hierarchy with datatypes, semantic rules
>> and all that. We can validate instance data against the schema, not
>> against the schema tree. This is at least how I understand it.
> The current definition says "definition hierarchy specified within a
> module", perhaps this was intended to mean 'tree of schema nodes', but
> perhaps it means "the hierarchy with datatypes, semantic rules and all
> that". ;-) Looking at the definition of schema node, I see:
>   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.
> With this, your interpretation makes sense and a better way to define
> scheme tree would then be:
>   o schema tree: The tree formed out of schema nodes of a module.
> The schema could be defined as
>   o schema: All definitions of a module including the schema tree.
> I think it is OK to scope these definitions to the notion of a module.
> If people talk about the schema (schema tree, schema nodes) of a
> collection of modules, it seems natural to assume that this means the
> union of the schemas (schema trees, schema nodes).

In many cases it is more useful to talk about the multi-module schema as
defined by YANG library and, potentially, schema mount. The
tree-diagrams draft assumes that tree diagrams will capture both the
parent and mounted hierarchy in the same diagram. The thing is that a
collection of modules often defines hierarchies that aren't mere
side-by-side unions of the individual module hierarches. And
specifically, it is somewhat difficult to talk about a hierarchy for a
module that consists only of augments, without having the context of the
module(s) augmented by it.

So I would suggest to define both "module schema/tree" and
"schema/tree", the latter meaning a multi-module schema as defined by
YANG library and schema mount specification.

Actually, we have another candidate for a more precise definition, namely
"data model". So one option could also be to use "schema/tree" for the
single-module, and "data model/tree" for the multi-module stuff.


> /js
> -- 
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <>
> _______________________________________________
> netmod mailing list

Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67