Re: [netmod] schema mount open issue #1
Lou Berger <lberger@labn.net> Mon, 28 August 2017 11:27 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 7D414132CF9 for <netmod@ietfa.amsl.com>; Mon, 28 Aug 2017 04:27:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.201
X-Spam-Level:
X-Spam-Status: No, score=-4.201 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, 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 ewICeu-zD_ZB for <netmod@ietfa.amsl.com>; Mon, 28 Aug 2017 04:27:43 -0700 (PDT)
Received: from gproxy7-pub.mail.unifiedlayer.com (gproxy7-pub.mail.unifiedlayer.com [70.40.196.235]) (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 2E8991329C5 for <netmod@ietf.org>; Mon, 28 Aug 2017 04:27:43 -0700 (PDT)
Received: from CMOut01 (unknown [10.0.90.82]) by gproxy7.mail.unifiedlayer.com (Postfix) with ESMTP id 7F380215C5F for <netmod@ietf.org>; Mon, 28 Aug 2017 05:27:42 -0600 (MDT)
Received: from box313.bluehost.com ([69.89.31.113]) by CMOut01 with id 2bTe1w00q2SSUrH01bThxq; Mon, 28 Aug 2017 05:27:42 -0600
X-Authority-Analysis: v=2.2 cv=fJ5J5dSe c=1 sm=1 tr=0 a=h1BC+oY+fLhyFmnTBx92Jg==:117 a=h1BC+oY+fLhyFmnTBx92Jg==:17 a=IkcTkHD0fZMA:10 a=KeKAF7QvOSUA:10 a=wU2YTnxGAAAA:8 a=u07AKapRAAAA:8 a=48vgC7mUAAAA:8 a=YO-WnUvhk5TAcHNkvwwA:9 a=QEXdDO2ut3YA:10 a=Yz9wTY_ffGCQnEDHKrcv:22 a=SkebfZ6J2Mmvk2rLHZle:22 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:Cc:To:Subject:Sender:Reply-To: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=WIgkX4F6NraH5miuzsvAsUhCQMZpusKGHtrioKxbWaE=; b=xFYt7zLmazaXuTdI7RHf5MSUww 3dWYD34Rraf1vb56tFVbj28xj5QS1Zj/1KHGqQ3mHq9b7hn5JN8cdGPV3CIlgGsY2qOAe9ob49ivG HJbW1SwWc/8j3a4MXYK7DC+J6;
Received: from pool-100-15-84-20.washdc.fios.verizon.net ([100.15.84.20]:45996 helo=fs2.dc.labn.net) by box313.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from <lberger@labn.net>) id 1dmICg-003ybP-Bj; Mon, 28 Aug 2017 05:27:38 -0600
To: Martin Bjorklund <mbj@tail-f.com>
Cc: netmod@ietf.org
References: <1aa26e59-6999-8f8a-6cd6-5e74050453bd@labn.net> <20170823.082906.1853252260651620253.mbj@tail-f.com> <edf93508-3b14-e962-488f-a4844d7f8399@labn.net> <20170828.122845.1527315474517128533.mbj@tail-f.com>
From: Lou Berger <lberger@labn.net>
Message-ID: <ca476502-c8f5-ffad-a463-04f21e2411f9@labn.net>
Date: Mon, 28 Aug 2017 07:27:37 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <20170828.122845.1527315474517128533.mbj@tail-f.com>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
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.84.20
X-Exim-ID: 1dmICg-003ybP-Bj
X-Source:
X-Source-Args:
X-Source-Dir:
X-Source-Sender: pool-100-15-84-20.washdc.fios.verizon.net (fs2.dc.labn.net) [100.15.84.20]:45996
X-Source-Auth: lberger@labn.net
X-Email-Count: 2
X-Source-Cap: bGFibm1vYmk7bGFibm1vYmk7Ym94MzEzLmJsdWVob3N0LmNvbQ==
X-Local-Domain: yes
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/m1xIAsVaRGXWwk1HC5H_-bsjfiE>
Subject: Re: [netmod] schema mount open issue #1
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, 28 Aug 2017 11:27:45 -0000
Martin, See below. On 08/28/2017 06:28 AM, Martin Bjorklund wrote: > Lou Berger <lberger@labn.net> wrote: >> Martin, >> See below >> >> >> On August 23, 2017 2:28:37 AM Martin Bjorklund <mbj@tail-f.com> wrote: >> >>> Lou Berger <lberger@labn.net> wrote: >>>> Hi Martin, >>>> >>>> See below. >>>> >>>> >>>> On 8/22/2017 6:20 AM, Martin Bjorklund wrote: >>>>> Hi, >>>>> >>>>> Lada presented an open issue in schema mount in Prague. (See slide 6 >>>>> in >>>>> >>>> https://datatracker.ietf.org/meeting/99/materials/slides-99-netmod-sessb-schema-mount) >>>>> >>>>> The original problem comes from the NI use case >>>>> (https://tools.ietf.org/html/draft-ietf-rtgwg-ni-model). In this >>>>> use case, interfaces are assigned to NIs by: >>>>> >>>>> augment /if:interfaces/if:interface: >>>>> +--rw bind-ni-name? -> /network-instances/network-instance/name >>>>> >>>>> Modules that are mounted within the NI might have references to >>>>> interfaces. The idea is that a specific NI can only reference the >>>>> interfaces that has been assigned to it. >>>>> >>>>> In schema mount, we have the "parent-reference" XPath expression that >>>>> in this case will be "/if:interfaces/if:interface". The problem is >>>>> that this XPath expression will evaluate to a node set that contains >>>>> *all* interfaces in the system. We would like this to contain just >>>>> the interfaces assigned to the NI. >>>>> >>>>> It turns out that this can be done with a simple change to the >>>>> "parent-reference" node. If we state that this XPath expression is >>>>> evaluated in an XPath context where the context node is the node in >>>>> the data tree where the mount point is defined (instead of "/"), we >>>>> can use as parent-reference: >>>>> >>>>> /if:interfaces/if:interface[ni:bind-network-instance-name = ../ni:name] >>>>> >>>>> Putting this together we'd have: >>>>> >>>>> augment "/if:interfaces/if:interface" { >>>>> leaf bind-ni-name { >>>>> type leafref { >>>>> path "/network-instances/network-instance/name"; >>>>> } >>>>> } >>>>> } >>>>> >>>>> container network-instances { >>>>> list network-instance { >>>>> key name; >>>>> leaf name { ... } >>>>> ... >>>>> container root { >>>>> // this would be the XPath context root for parent-reference >>>>> yangmnt:mount-point ni-root; >>>>> } >>>>> } >>>>> } >>>> >>>> note that the current NI definition is: >>> >>> Yes I saw that. >>> >>>> module: ietf-network-instance >>>> +--rw network-instances >>>> +--rw network-instance* [name] >>>> +--rw name string >>>> +--rw enabled? boolean >>>> +--rw description? string >>>> +--rw (ni-type)? >>>> +--rw (root-type)? >>>> +--:(vrf-root) >>>> | +--mp vrf-root? >>>> +--:(vsi-root) >>>> | +--mp vsi-root? >>>> +--:(vv-root) >>>> +--mp vv-root? >>> >>> Note that the extension yangmnt:mount-point can only be present in a >>> container or list, not in a choice/case. >> >> Okay, I missed that restriction in your draft. What's the reason for >> not allowing mounts under choices/cases? Isn't the resulting path to >> data nodes indistinguishable when the parent is a list or container? > > Suppose a server lists a couple of modules for "vrf-root" and some > other for "vsi-root" in the /schema-mounts/mount-point list. How can > a client tell if a certain NI instance is has the "vrf" modules or > "vsi" modules? umm, my understanding is that only one of the cases under a choice can be present in the data (tree) at a time so the client *can* only see one mount point {vrf-root, vsi-root or vv-root} node and all the mounted schemas will be under that '-root' node. What have I missed? > > In general, when you have a choice with cases, all nodes from all > cases are disjoint, and the client can tell which case is active by > checking which nodes are present. > > Wouldn't it be possible to restructure as bit so you have: > > choice ni-type { > container vrf { > ymt:mount-point vrf-root; > // additional vrf-specific config params goes here > } > container vsi { > ymt:mount-point vsi-root; > // additional vsi-specific config params goes here > } > ... > } > Yes, but there will *never* be any additional type specific parameters in the container (by definition), so the container serves no purpose and just adds to the path unnecessarily. > >>> But what is the point of a choice with three different mount points? >>> >>>> augment /if:interfaces/if:interface: >>>> +--rw bind-ni-name? -> /network-instances/network-instance/name >>>> augment /if:interfaces/if:interface/ip:ipv4: >>>> +--rw bind-ni-name? -> /network-instances/network-instance/name >>>> augment /if:interfaces/if:interface/ip:ipv6: >>>> +--rw bind-ni-name? -> /network-instances/network-instance/name >>>> >>>>> And in state data: >>>>> >>>>> >>>>> "ietf-yang-schema-mount:schema-mounts": { >>>>> "namespace": [ >>>>> { >>>>> "prefix": "ni", >>>>> "uri": "urn:ietf:params:xml:ns:yang:ietf-network-instance" >>>>> }, >>>>> { >>>>> "prefix": "if", >>>>> "uri": "urn:ietf:params:xml:ns:yang:ietf-interfaces" >>>>> } >>>>> ] >>>>> "mount-point": [ >>>>> { >>>>> "target": "/ni:network-instances/ni:network-instance/ni:root", >>>> Can you confirm that with the current definition the target is: >>>> >>>> "target": "/ni:network-instances/ni:network-instance", >>>> >>>> correct? >>> >>> See above; the current definition is invalid. >> >> this is going to get really verbose if schema mount's restrictions >> remain as we'll need a container and target per case mount point case. >> >> Looking at this issue leads me to ask the question: why are parent >> references tied to the mount point vs the schema? > > This gives more flexibility, since several mount points can share a > single schema. from my (user) perspective, the parent references are an equally intrinsic part of the schema and the flexibility adds unneeded complexity. > Also, if we had parent-reference per schema, we cannot > solve the original issue that started this thread. We/I can live with the current solution (and its overhead), so this isn't a critical discussion. Let's focus on the open point covered above. Thanks, Lou
- [netmod] schema mount open issue #1 Martin Bjorklund
- Re: [netmod] schema mount open issue #1 Acee Lindem (acee)
- Re: [netmod] schema mount open issue #1 Martin Bjorklund
- Re: [netmod] schema mount open issue #1 Lou Berger
- Re: [netmod] schema mount open issue #1 Martin Bjorklund
- Re: [netmod] schema mount open issue #1 Lou Berger
- Re: [netmod] schema mount open issue #1 Martin Bjorklund
- Re: [netmod] schema mount open issue #1 Lou Berger
- Re: [netmod] schema mount open issue #1 Martin Bjorklund
- Re: [netmod] schema mount open issue #1 Lou Berger
- Re: [netmod] schema mount open issue #1 Ladislav Lhotka
- Re: [netmod] schema mount open issue #1 Lou Berger
- Re: [netmod] schema mount open issue #1 Ladislav Lhotka
- Re: [netmod] schema mount open issue #1 Lou Berger
- Re: [netmod] schema mount open issue #1 Martin Bjorklund
- Re: [netmod] schema mount open issue #1 Lou Berger
- Re: [netmod] schema mount open issue #1 Martin Bjorklund
- Re: [netmod] schema mount open issue #1 Lou Berger
- Re: [netmod] schema mount open issue #1 Per Hedeland
- Re: [netmod] schema mount open issue #1 Lou Berger
- Re: [netmod] schema mount open issue #1 Ladislav Lhotka
- Re: [netmod] schema mount open issue #1 Per Hedeland
- Re: [netmod] schema mount open issue #1 Martin Bjorklund
- Re: [netmod] schema mount open issue #1 Lou Berger
- Re: [netmod] schema mount open issue #1 Xufeng Liu
- Re: [netmod] schema mount open issue #1 Ladislav Lhotka
- Re: [netmod] schema mount open issue #1 Lou Berger
- Re: [netmod] schema mount open issue #1 Martin Bjorklund
- Re: [netmod] schema mount open issue #1 terminolo… t.petch