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

Balazs Lengyel <> Thu, 05 May 2016 14:36 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 2D2C512DA1C; Thu, 5 May 2016 07:36:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.497
X-Spam-Status: No, score=-3.497 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id w194R4fI-ccy; Thu, 5 May 2016 07:36:14 -0700 (PDT)
Received: from ( []) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id EB5E712DA25; Thu, 5 May 2016 07:28:23 -0700 (PDT)
X-AuditID: c1b4fb25-f79f26d00000327e-0c-572b58864296
Received: from (Unknown_Domain []) by (Symantec Mail Security) with SMTP id 81.C8.12926.6885B275; Thu, 5 May 2016 16:28:22 +0200 (CEST)
Received: from [] ( by ( with Microsoft SMTP Server id; Thu, 5 May 2016 16:28:21 +0200
To: Xufeng Liu <>, "'Joel M. Halpern'" <>, "'Tarek Saad (tsaad)'" <>, 'Martin Bjorklund' <>
References: <> <> <> <> <01fc01d1a259$71cfae00$556f0a00$>
From: Balazs Lengyel <>
Message-ID: <>
Date: Thu, 05 May 2016 16:28:20 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0
MIME-Version: 1.0
In-Reply-To: <01fc01d1a259$71cfae00$556f0a00$>
Content-Type: text/html; charset="windows-1252"
Content-Transfer-Encoding: 8bit
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMLMWRmVeSWpSXmKPExsUyM2J7uG5bhHa4wY5PfBYTD9hbfOp4yWLx 8dQbJovu7mfsFreWrmS1mH+xkdWi9ccOFotPJ34yWVw5/ofJgdNjyu+NrB47Z91l91iy5CeT x7kp3xk9Nv5azBLAGsVlk5Kak1mWWqRvl8CVMev0CpaCbxEVTbdPszQwHnPpYuTgkBAwkbi9 lK+LkRPIFJO4cG89WxcjF4eQwBFGiT9b57NDOGsYJQ50PWECqRIWcJJY93IrM0hCRGAFo8Sl 158ZIap6mSROLZ7NAuIwC3QwSry5s4YNpIVNwEhiav95FhCbV8Be4sGXR8wgu1kEVCQm/q8G CYsKREk8Ob2WGaJEUOLkzCdg5ZwCFhJb1pwGs5kF9CWu37nPCmHLSzRvnQ1WLySgIfHwwl/W CYyCs5C0z0LSMgtJywJG5lWMosWpxUm56UbGeqlFmcnFxfl5enmpJZsYgVFxcMtv1R2Ml984 HmIU4GBU4uFVWKkVLsSaWFZcmXuIUYKDWUmE93m4drgQb0piZVVqUX58UWlOavEhRmkOFiVx Xv+XiuFCAumJJanZqakFqUUwWSYOTqkGRoa9u8t9D8mrZZYVMy+Yf+t+8hXprRuL3iu0i09e 9TGXb8Era7UvrOfiwy6UPIrXElR2+XjQwWHB7qK7Py8/Ztgja7SHzTzgX+ec61ssWXZNTdNe fIJVYnPN/A8hLrox6tqTdtguamoOmnQyxvum33t9g6dJeRF1Iuv9czj1zNLsHlm++DErTIml OCPRUIu5qDgRAOAWiFWGAgAA
Archived-At: <>
Subject: Re: [mpls] [netmod] [Teas] Use of schema mounts for common model
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Multi-Protocol Label Switching WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 05 May 2016 14:36:18 -0000


As I see it the problem is that as we don't know the mount relationships early. All you can say in the constraint is "point at some interface". So having a specific path statement is not feasible.

Using instance-identifiers may help. While it is hard it is not impossible to constrain instance-identifiers. You can put a regular expression on their "string" representation, e.g.  rematch(.,'/.*/interface[name=.*]')

 This would alow you to point at an interface anywhere (as long as the list is named interface with a key called name :-( ). Note the regexp is not 100% OK.
regards Balazs

On 2016-04-29 22:55, Xufeng Liu wrote:
We still hope that schema mount can handle cross-referencing across mounted
modules. It is also needed when ietf-interfaces model is mounted to
logical-network-element  and network-instance models.

More comments for this case below in-line.


- Xufeng

-----Original Message-----
From: Teas [] On Behalf Of Joel M. Halpern
Sent: Friday, April 29, 2016 1:05 PM
To: Tarek Saad (tsaad) <>; Martin Bjorklund
Subject: Re: [Teas] [netmod] Use of schema mounts for common model

With regard to leafrefs trying to point into groupings, would
work for your use case?

In this case, it would be hard to specify the must conditions for these
instance-identifiers to make them always applicable when the groupings are
used in various situations. If we are willing to re-structure everything,
the method used in draft-halpern-supa-generic-policy-data-model could be an
option to explore. 


On 4/29/16 12:17 PM, Tarek Saad (tsaad) wrote:
Thanks Martin, please see inline..

On 2016-04-29, 6:29 AM, "Martin Bjorklund" <
<>> wrote:

    "Tarek Saad (tsaad)" < <>>
        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,
        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.:

    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

We thought of this earlier, and found groupings pose their own set of
challenges too.. Specifically:
- a groupings with leafrefs could not reference data nodes that reside
in another grouping
- a grouping with leafrefs of relative path were challenge when the
relative path references data nodes outside the grouping
- the augmentation of the grouping by other modules is not as

That said, the grouping proposal seems to

one could also think that with groupings one could address reuse of
the a model (e.g. Ietf-interfaces) for logical devices or VM (see
below). In fact, in your draft (section 2) you explicitly discourage
this approach as not scalable solution

   With the "uses" approach, ietf-interfaces would have to define a
   grouping with all its nodes, and the new model for logical devices
   would have to use this grouping.  This is a not a scalable solution,
   since every time there is a new model defined, we would have to
   update our model for logical devices to use a grouping from the new
   model.  Another problem is that this approach cannot handle vendor-

        We have a comment/concern/suggestion and we value your feedback.
        The generic TE model currently references data nodes in the
        tree (e.g. from the ietf-interfaces model to define additional
        properties associated with a specific device interface). Our
        understanding after reading section 3.1 of your draft is the
        model can *not* reference any data nodes outside the scope of
        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
        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
        this or better suggestions?

In this case, there are multiple augmentations to ietf-te.yang, such as
ietf-rsvp-te and ietf-sr-te. If ietf-te is a grouping, we cannot do the
augmentations before ietf-te is used. Using the grouping would be very
awkward when ietf-te is used. We would have to make the same many
augmentations at that time. Even worse, there could be future augmentations,
we cannot specify these augmentations now because they are not defined yet.

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

Not in all cases - as described above.



        Excerpt from draft-ietf-netmod-schema-mount
        3.1<" rel="nofollow">
        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
            mounted data nodes as its children.  This means that data
        within a
            mounted subtree can never refer to data outside of this

netmod mailing list" rel="nofollow">

Teas mailing list" rel="nofollow">
netmod mailing list" rel="nofollow">

Balazs Lengyel                       Ericsson Hungary Ltd.
Senior Specialist
Mobile: +36-70-330-7909              email: