Re: [netmod] Schema-mount question: Augmentation to the Mounted Module

Ladislav Lhotka <lhotka@nic.cz> Wed, 14 June 2017 13:22 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 5A07A1294FF; Wed, 14 Jun 2017 06:22:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.001
X-Spam-Level:
X-Spam-Status: No, score=-7.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 89q0mHTiMpCj; Wed, 14 Jun 2017 06:22:04 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 075CF126FDC; Wed, 14 Jun 2017 06:22:04 -0700 (PDT)
Received: from [IPv6:2001:1488:fffe:6:ffff:ffff:ffff:10] (unknown [IPv6:2001:1488:fffe:6:ffff:ffff:ffff:10]) by mail.nic.cz (Postfix) with ESMTPSA id 16CF060899; Wed, 14 Jun 2017 15:22:02 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1497446522; bh=rh+rAoTT3IeD7fIcvSsL1yV4RUPibHvN0tpKNMMt7Jw=; h=From:Date:To; b=ZXxTiNtvETPj/3Oum76AvHCV9J34wMmunxJDAc2Eey8qpcJV8N1WB/Uwui05hxY7k /s14lh01dymlmu+GhW4ub14s+VVzzl54LR7dmsSAlCMRiwjo+oMx9jPvepTU3tEyM9 ykLlFb3ecI5eig1537mpElkCzZijFgxwIJ2jEWtg=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <bfed97ed-e5b5-2f20-a15d-d8761eda8d36@labn.net>
Date: Wed, 14 Jun 2017 15:22:01 +0200
Cc: Xufeng Liu <xufeng.liu.ietf@gmail.com>, draft-ietf-netmod-schema-mount@ietf.org, netmod@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <CC3B662E-1018-45DD-95A8-9AC07848C6F9@nic.cz>
References: <01b901d2e483$792089f0$6b619dd0$@gmail.com> <m2wp8ehl81.fsf@nic.cz> <bfed97ed-e5b5-2f20-a15d-d8761eda8d36@labn.net>
To: Lou Berger <lberger@labn.net>
X-Mailer: Apple Mail (2.3273)
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/WYri1EoecMsLlt33zQhNtAMYGfo>
Subject: Re: [netmod] Schema-mount question: Augmentation to the Mounted Module
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: Wed, 14 Jun 2017 13:22:06 -0000

> On 14 Jun 2017, at 13:43, Lou Berger <lberger@labn.net> wrote:
> 
> Hi,
> 
> (speaking as contributor...)
> 
> 
> On 6/14/2017 7:17 AM, Ladislav Lhotka wrote:
>> Hi Xufeng,
>> 
>> please see my answers inline.
>> 
>> Xufeng Liu <xufeng.liu.ietf@gmail.com> writes:
>> 
>>> Hi Lada,
>>> 
>>> 
>>> 
>>> We have got two questions on how to specify the module entries in a schema:
>>> 
>>> 
>>> 
>>> 1.	Are augmentations of parent modules inherited when augmented module
>>> is listed in schema-mounts schema?
>>> 
>>> For example, ietf-ospf module augments ietf-routing. When we include
>>> ietf-routing to the schema entry, is ietf-ospf automatically included?
>> No, you also have to include "ietf-ospf" in the "module" list inside the
>> corresponding "schema" entry, exactly as you do in the top level YANG
>> library, otherwise ietf-ospf won't be mounted.
> 
> I agree.  The draft should have text that makes this explicit.

Why? It should be sufficiently clear that modules that are not listed in "schema" are not present in the mounted schema. An augment is just a special mechanism of contributing schema nodes. 

> 
>>> 
>>> 
>>> 2.	When we have ietf-yang-library mounted under a parent (LNE), does
>>> ietf-yang-library have to contain exactly the same list of Yang modules as
>>> the list contained in the "schema" entry under "schema-mount"?
>> I am not sure I understand but do you mean an LNE mounted schema defined via
>> the "use-schema" case that also includes ietf-yang-library? This is a
>> corner case we probably haven't thought about but it IMO doesn't make
>> any sense to do so because the applicable YANG library that counts is
>> inside the "schema" entry. Martin, should we address this anomaly?
> 
> I think this is a very real scenario for LNE.  Consider a 'host' system
> that allows read only views of the LNE and wants the benefit of
> "use-schema".  In this case, library under the mount point is still
> needed for client access within the mounted LNE.

In this case it would IMO be much better if the server inside the LNE provide YANG library data separately for its clients. The client of the host system needn't see it because it is just redundant.

>  
> 
> It seems to me that in this case the mounted library module data must
> exactly match what is listed in the corresponding "schema" entry under
> "schema-mount" in order to ensure deterministic client views/behavior. 
> Again, I think this should be made explicit in the draft.

Another option is to ban ietf-yang-library in schemas mounted via "use-schema". I still think it is wrong to tout "inline" and "use-schema" as the same "schema mount" concept. If we clearly separated the two concepts, "inline" would become an absolute no-brainer requiring just a single YANG extension statement, and "use-schema" would also be easier to explain with no confusing exceptions and qualifications. It's just simple divide-and-conquer in terms of the spec, with no limitations compared to the current options.

Lada

> 
>> BTW, I think that normally LNE schema is supposed to be mounted using the
>> "inline" case, and then of course ietf-yang-library is required but
>> there is no "schema" entry under "schema-mounts" to worry about.
> Both inline and non-inline LNE usage is expected in real systems...
> 
> Lou
>> Lada
>> 
>>> For example, ietf-ospf module augments ietf-routing. When we mount
>>> ietf-routing ietf-yang-library to LNE, should we list ietf-ospf in the mount
>>> module list? And also in ietf-yang-library?
>>> 
>>> 
>>> 
>>> It would be great if these can be clarified.
>>> 
>>> 
>>> 
>>> Thanks,
>>> 
>>> - Xufeng

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