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

Ladislav Lhotka <lhotka@nic.cz> Mon, 13 November 2017 03:19 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 160C51293F2 for <netmod@ietfa.amsl.com>; Sun, 12 Nov 2017 19:19:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
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 mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aEQvSfgzMQTy for <netmod@ietfa.amsl.com>; Sun, 12 Nov 2017 19:19:43 -0800 (PST)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id 3F4C41293F5 for <netmod@ietf.org>; Sun, 12 Nov 2017 19:19:43 -0800 (PST)
Received: by trail.lhotka.name (Postfix, from userid 109) id 74D8C18215DD; Mon, 13 Nov 2017 04:18:37 +0100 (CET)
Received: from localhost (dhcp-8a3e.meeting.ietf.org [31.133.138.62]) by trail.lhotka.name (Postfix) with ESMTPSA id 73E171820F76; Mon, 13 Nov 2017 04:18:33 +0100 (CET)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Robert Wilton <rwilton@cisco.com>, "netmod@ietf.org" <netmod@ietf.org>
In-Reply-To: <20171110160836.2hy5nr4zuklwnjjj@elstar.local>
References: <47B1141C-8979-4910-B7CA-2114B9C0D352@juniper.net> <68c6a4d5-fd3e-efdb-9c34-f69f241d6a31@cisco.com> <874lq4oq94.fsf@nic.cz> <7d8a8b01-6d3b-ac29-dd58-f2771ecdad56@cisco.com> <87d14rjwdq.fsf@nic.cz> <56ea1907-c2ed-1940-089c-527b33f0723e@cisco.com> <20171109181638.zel2otpzrptggvwz@elstar.local> <87lgje9m87.fsf@nic.cz> <20171110160836.2hy5nr4zuklwnjjj@elstar.local>
Mail-Followup-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Robert Wilton <rwilton@cisco.com>, "netmod\@ietf.org" <netmod@ietf.org>
Date: Mon, 13 Nov 2017 11:20:44 +0800
Message-ID: <87vaieoodv.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/CFGZbhZSAJiFtl3lBghfNYhWcxE>
Subject: Re: [netmod] WG Last Call: draft-ietf-netmod-schema-mount-07
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Nov 2017 03:19:46 -0000

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> 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.

Lada


>
> /js
>
> -- 
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

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