Re: [mpls] [netmod] Use of schema mounts for common model

Martin Bjorklund <mbj@tail-f.com> Fri, 29 April 2016 10:29 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: mpls@ietfa.amsl.com
Delivered-To: mpls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 13CB512D5F8; Fri, 29 Apr 2016 03:29:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.897
X-Spam-Level:
X-Spam-Status: No, score=-2.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-0.996, SPF_PASS=-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 IX3Y4pAm4TXT; Fri, 29 Apr 2016 03:29:51 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 0F64E12D5ED; Fri, 29 Apr 2016 03:29:45 -0700 (PDT)
Received: from localhost (h-186-70.a165.priv.bahnhof.se [109.228.186.70]) by mail.tail-f.com (Postfix) with ESMTPSA id 7A1F31AE0119; Fri, 29 Apr 2016 12:29:43 +0200 (CEST)
Date: Fri, 29 Apr 2016 12:29:43 +0200
Message-Id: <20160429.122943.1926404425708749601.mbj@tail-f.com>
To: tsaad@cisco.com
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <4A05DD10-0885-435C-9D13-9634388B9F4B@cisco.com>
References: <4A05DD10-0885-435C-9D13-9634388B9F4B@cisco.com>
X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="utf-8"
Content-Transfer-Encoding: base64
Archived-At: <http://mailarchive.ietf.org/arch/msg/mpls/_JjxjarOPigfVO_ClvJ8q1T5HY0>
Cc: draft-ietf-teas-yang-te@ietf.org, mpls@ietf.org, netmod@ietf.org, teas@ietf.org, draft-ietf-netmod-schema-mount@ietf.org
Subject: Re: [mpls] [netmod] Use of schema mounts for common model
X-BeenThere: mpls@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Multi-Protocol Label Switching WG <mpls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mpls>, <mailto:mpls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mpls/>
List-Post: <mailto:mpls@ietf.org>
List-Help: <mailto:mpls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mpls>, <mailto:mpls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Apr 2016 10:29:53 -0000

"Tarek Saad (tsaad)" <tsaad@cisco.com> wrote:
> Hi authors/WG,
> 
> In draft-ietf-teas-yang-te, we are driving the definition for a
> generic TE YANG model that can/may be used (and extended when
> necessary) for different data plane technologies (e.g. MPLS, OTN, WDM,
> etc.).
> Reviewing the schema mount idea presented in
> draft-ietf-netmod-schema-mount, we are thinking this proposal is
> useful and can facilitate the reuse of the our model in multiple
> places in the YANG tree (once per each technology), e.g.:
> …/mpls/mount-points/mount-point/module=ietf-te.yang
> …/otn/mount-points/mount-point/module=ietf-te.yang

Schema mount is probably not the right solution to your problem.  I
think a better solution in your case is to define groupings.
Groupings are designed to be re-used at different places in the
hierarchy.

> We have a comment/concern/suggestion and we value your feedback.
> 
> The generic TE model currently references data nodes in the global
> tree (e.g. from the ietf-interfaces model to define additional TE
> properties associated with a specific device interface). Our
> understanding after reading section 3.1 of your draft is the mounted
> model can *not* reference any data nodes outside the scope of the
> mount-point (e.g. global data nodes in the yang tree). This poses a
> limitation for us, do you have a suggestion for this problem?
> 
> One possible solution we thought of was to replace the leaf-refs
> pointing to the global data nodes (e.g. Ietf-interfaces) with context
> names (e.g. the interface name).. This decouples the data-nodes
> defined in the TE generic model from those in the global tree
> (e.g. the actual interface ietf-interfaces model). Any feedback on
> this or better suggestions?

If you use groupings instead, you can still use proper leafrefs.


/martin



> 
> Regards,
> Tarek
> 
> Excerpt from draft-ietf-netmod-schema-mount
> 
> 3.1<https://tools.ietf.org/html/draft-ietf-netmod-schema-mount-01#section-3.1>.
> Augment and Validation in Mounted Data
> 
> 
>    All paths (in leafrefs, instance-identifiers, XPath expressions, and
>    target nodes of augments) in the data models mounted at a mount point
>    are interpreted with the mount point as the root node, and the
>    mounted data nodes as its children.  This means that data within a
>    mounted subtree can never refer to data outside of this subtree.
> 
> 
> 
>