Re: [netmod] schema mount and YANG library

Lou Berger <lberger@labn.net> Mon, 18 December 2017 20:30 UTC

Return-Path: <lberger@labn.net>
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 E06F412D871 for <netmod@ietfa.amsl.com>; Mon, 18 Dec 2017 12:30:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.002
X-Spam-Level:
X-Spam-Status: No, score=-0.002 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (768-bit key) header.d=labn.net
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 39-JkXJFE6Rs for <netmod@ietfa.amsl.com>; Mon, 18 Dec 2017 12:30:15 -0800 (PST)
Received: from gproxy5-pub.mail.unifiedlayer.com (gproxy5-pub.mail.unifiedlayer.com [67.222.38.55]) (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 26A1612D876 for <netmod@ietf.org>; Mon, 18 Dec 2017 12:30:15 -0800 (PST)
Received: from CMOut01 (unknown [10.0.90.82]) by gproxy5.mail.unifiedlayer.com (Postfix) with ESMTP id DD0341404A3 for <netmod@ietf.org>; Mon, 18 Dec 2017 13:30:14 -0700 (MST)
Received: from box313.bluehost.com ([69.89.31.113]) by CMOut01 with id nYWB1w0042SSUrH01YWEeV; Mon, 18 Dec 2017 13:30:14 -0700
X-Authority-Analysis: v=2.2 cv=VcCHBBh9 c=1 sm=1 tr=0 a=h1BC+oY+fLhyFmnTBx92Jg==:117 a=h1BC+oY+fLhyFmnTBx92Jg==:17 a=IkcTkHD0fZMA:10 a=xqWC_Br6kY4A:10 a=ocR9PWop10UA:10 a=48vgC7mUAAAA:8 a=Kf0pTAewjCEAPpiRrB0A:9 a=QEXdDO2ut3YA:10 a=w1C3t2QeGrPiZgrLijVG:22
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=labn.net; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version :Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Cwykp/M0RlSIN7xzanrVxHAAwck8BT6G8J9bh0lLaB4=; b=jL4kw1GjuacQgKhO9J5r06SHJj 372aQxfIw9JJj78nQh+0MqEmYwcOw+WkrAncX/wTYAz0m2sEWnmihz2Kph9dj2/WKpwgX2H5xqpUE MJ762RaES/29iQfZlPuEH72WP;
Received: from pool-100-15-86-101.washdc.fios.verizon.net ([100.15.86.101]:50176 helo=[IPv6:::1]) by box313.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from <lberger@labn.net>) id 1eR238-004Asg-R9 for netmod@ietf.org; Mon, 18 Dec 2017 13:30:11 -0700
To: NETMOD WG <netmod@ietf.org>
References: <1512747137.3467.71.camel@nic.cz> <87zi6kay8b.fsf@nic.cz>
From: Lou Berger <lberger@labn.net>
Message-ID: <30ba994a-96b5-880c-ea43-b67469933a94@labn.net>
Date: Mon, 18 Dec 2017 15:30:08 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
MIME-Version: 1.0
In-Reply-To: <87zi6kay8b.fsf@nic.cz>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - box313.bluehost.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - labn.net
X-BWhitelist: no
X-Source-IP: 100.15.86.101
X-Exim-ID: 1eR238-004Asg-R9
X-Source:
X-Source-Args:
X-Source-Dir:
X-Source-Sender: pool-100-15-86-101.washdc.fios.verizon.net ([IPv6:::1]) [100.15.86.101]:50176
X-Source-Auth: lberger@labn.net
X-Email-Count: 10
X-Source-Cap: bGFibm1vYmk7bGFibm1vYmk7Ym94MzEzLmJsdWVob3N0LmNvbQ==
X-Local-Domain: yes
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/JTvIYFpOu7THoextLUWzIhblLWo>
Subject: Re: [netmod] schema mount and YANG library
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, 18 Dec 2017 20:30:17 -0000

lada,

    See below.


On 12/15/2017 8:59 AM, Ladislav Lhotka wrote:
> Hi,
>
> unfortunately, using an action for querying embedded YANG library data
> (needed for the "inline" case of schema mount) doesn't work either
> because now under NMDA actions can be used only on instances in the
> <operational> datastore.

but the inline/embedded library would (only) be present in the in the
operational datastore, so what's the issue?

> However, a good alternative seems to be a metadata annotation along the
> lines of RFC 7952, for example with the alternative B of the newly
> proposed YANG library schema:
>
>      md:annotation schema-ref {
>        type leafref {
>          path "/yanglib:yang-library/yanglib:schema/yanglib:name";
>        }
>      }
>
> In other words, all inline mounted schemas would be included in the
> top-level YANG library, and mount point instances in all datastores
> would be annotated with leafref pointing to the actual schema.
>
> Unlike regular state data, it is IMO no problem to permit such
> annotations in configuration datastores.
>
> Opinions?
I'm not sure this will work for all architectures of LNEs as well as
other possible future use cases.  In short, this seems *very* restrictive.

Lou

>
> Thanks, Lada
>
> Ladislav Lhotka <lhotka@nic.cz> writes:
>
>> Hi,
>>
>> the following text in sec. 3.2 of schema-mount-08 is wrong for traditional
>> datastores, and even more so for NDMA:
>>
>>    In case 1 ["inline"], the mounted schema is determined at run time: every
>>    instance of the mount point that exists in the parent tree MUST
>>    contain a copy of YANG library data [RFC7895] that defines the
>>    mounted schema exactly as for a top-level data model.  A client is
>>    expected to retrieve this data from the instance tree, possibly after
>>    creating the mount point.  Instances of the same mount point MAY use
>>    different mounted schemas.
>>
>> An instance of the mount point in any *configuration* datastores cannot contain
>> YANG library (being state data), and so the MUST cannot hold.
>>
>> It is not clear to me how to repair this without considerable complications
>> and/or a lot of handwaving. There is actually one good solution but it has
>> impact on YANG library: the server could provide it in a reply to an operation,
>> say "get-yang-library" rather than as state data. Then everything would be fine
>> - this operation would turn into an action for the mount point, and it can be
>> used equally well for config true and false mount points.
>>
>> So my proposal is to move from YANG library as state data to an operation. It
>> could be done along with changing the YANG library structure, so there will be
>> little extra impact on implementations. 
>>
>> Lada 
>>
>> -- 
>> Ladislav Lhotka
>> Head, CZ.NIC Labs
>> PGP Key ID: 0xB8F92B08A9F76C67
>>
>> _______________________________________________
>> netmod mailing list
>> netmod@ietf.org
>> https://www.ietf.org/mailman/listinfo/netmod