Re: [netmod] Question about schema-mount

Martin Bjorklund <mbj@tail-f.com> Thu, 28 November 2019 08:27 UTC

Return-Path: <mbj@tail-f.com>
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 4435312003F for <netmod@ietfa.amsl.com>; Thu, 28 Nov 2019 00:27:54 -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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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 pHRFx-Mr2yYZ for <netmod@ietfa.amsl.com>; Thu, 28 Nov 2019 00:27:52 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 4552F120019 for <netmod@ietf.org>; Thu, 28 Nov 2019 00:27:41 -0800 (PST)
Received: from localhost (h-4-44.A165.priv.bahnhof.se [158.174.4.44]) by mail.tail-f.com (Postfix) with ESMTPSA id A87D01AE02C9; Thu, 28 Nov 2019 09:27:38 +0100 (CET)
Date: Thu, 28 Nov 2019 09:27:38 +0100 (CET)
Message-Id: <20191128.092738.1831675400353812183.mbj@tail-f.com>
To: bart.bogaert@nokia.com
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <PR1PR07MB5084895F5DBBA09EA1ADE2B494440@PR1PR07MB5084.eurprd07.prod.outlook.com>
References: <PR1PR07MB5084895F5DBBA09EA1ADE2B494440@PR1PR07MB5084.eurprd07.prod.outlook.com>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Ulp_Tc0rIC_KM2SCcTc1JdEQcH0>
Subject: Re: [netmod] Question about schema-mount
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 28 Nov 2019 08:27:54 -0000

Hi,

"Bogaert, Bart (Nokia - BE/Antwerp)" <bart.bogaert@nokia.com> wrote:
> Hi,
> 
> We're trying to figure out whether it is possible to define a module
> in the parent schema which would use a node being a leafref to a node
> in a model under a mount point.

In order for this to work, the leafref target would have to be present
at compile time / design time.  RFC 8528 defines Design time,
Implementation time, and Run time mounts, and says: "Design-time
mounts are outside the scope of this document" (see section 1).

Another alternative would be some new kind of "leafref-like" construct
that supported this.

What you can do though is to ensure the leaf in the parent module is
of the same type as the mounted node you want to refer to, and explain
in text what the semantics is.


> I don't seem to find any statement
> that would prohibit this but RFC 8530, referred to from the schema
> mount RFC, uses a leafref to a node in a module which is still in the
> list of YANG modules of the parent (and consequently in the YANG
> library of the parent).
> 
> So, using RFC8530 as example:
> 
> Instead of lne:bind-lne-name being a leafref to
> /logical-network-elements/logical-network-element/name we would point
> to
> /logical-network-elements/logical-network-element/interfaces/interface/name.
> 
> The interfaces YANG module is also part of the YANG library of the
> parent but I'm not so sure whether above construction would work well
> as the information related to the mounted YANG modules is in a YANG
> library different from the parent's YANG library.
> 
> Note that there is also some confusion with the examples in RFC8530:
> while the bind-lne-name in the YANG module is a leafref as syntax, the
> examples work with a string as syntax for that same leaf.

Do you mean the tree diagram?

   module: ietf-interfaces
     +--rw interfaces
        +--rw interface* [name]
           +--rw name                        string
           +--rw lne:bind-lne-name?          string

This looks like a bug to me; it should be a leafref.


/martin