[netmod] Question on modeling of restriction using YANG capabilities

"Bogaert, Bart (Nokia - BE)" <bart.bogaert@nokia.com> Tue, 15 March 2016 08:03 UTC

Return-Path: <bart.bogaert@nokia.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 76BC712D94A for <netmod@ietfa.amsl.com>; Tue, 15 Mar 2016 01:03:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.92
X-Spam-Level:
X-Spam-Status: No, score=-6.92 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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 lCIFwbUdZH6v for <netmod@ietfa.amsl.com>; Tue, 15 Mar 2016 01:02:54 -0700 (PDT)
Received: from smtp-fr.alcatel-lucent.com (fr-hpida-esg-02.alcatel-lucent.com [135.245.210.21]) (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 96B5012D8EF for <netmod@ietf.org>; Tue, 15 Mar 2016 01:02:54 -0700 (PDT)
Received: from fr712umx3.dmz.alcatel-lucent.com (unknown [135.245.210.42]) by Websense Email Security Gateway with ESMTPS id 1112FD05513D9 for <netmod@ietf.org>; Tue, 15 Mar 2016 08:02:49 +0000 (GMT)
Received: from fr711usmtp1.zeu.alcatel-lucent.com (fr711usmtp1.zeu.alcatel-lucent.com [135.239.2.122]) by fr712umx3.dmz.alcatel-lucent.com (GMO-o) with ESMTP id u2F82onJ027329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <netmod@ietf.org>; Tue, 15 Mar 2016 08:02:50 GMT
Received: from FR711WXCHHUB01.zeu.alcatel-lucent.com (fr711wxchhub01.zeu.alcatel-lucent.com [135.239.2.111]) by fr711usmtp1.zeu.alcatel-lucent.com (GMO) with ESMTP id u2F82gVZ007872 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for <netmod@ietf.org>; Tue, 15 Mar 2016 09:02:49 +0100
Received: from FR712WXCHMBA09.zeu.alcatel-lucent.com ([169.254.5.203]) by FR711WXCHHUB01.zeu.alcatel-lucent.com ([135.239.2.111]) with mapi id 14.03.0195.001; Tue, 15 Mar 2016 09:01:44 +0100
From: "Bogaert, Bart (Nokia - BE)" <bart.bogaert@nokia.com>
To: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: Question on modeling of restriction using YANG capabilities
Thread-Index: AdF+kOk7Mu/8N02FSMa3htoCCAR63w==
Date: Tue, 15 Mar 2016 08:01:43 +0000
Message-ID: <D62E05768DBAFF42A72B9F4954476D65F634318C@FR712WXCHMBA09.zeu.alcatel-lucent.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [135.239.27.40]
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_005A_01D17E99.4B059C50"
MIME-Version: 1.0
Archived-At: <http://mailarchive.ietf.org/arch/msg/netmod/KBZYshoY13BnZYlaKhfnSAsymw4>
Subject: [netmod] Question on modeling of restriction using YANG capabilities
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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: Tue, 15 Mar 2016 08:03:01 -0000

Dear Yang specialists,

 

I have a question concerning what is possible in must statements in case of
recursive models.  Assume the following "limits" depending on a plugable
board (just arbitrary examples):

 

+------------+---------+----------------+

| Board type | # ports | max VLAN ports |

+------------+---------+----------------+

|      A     |  8      |  80            |

|      B     |  4      |  40            |

|      C     |  2      |  40            |

|      D     |  16     |  100           |

+------------+---------+----------------+

 

The entity model is a recursive one where you start from the root (below is
just an example to depict the nature of the problem):

 

/entity

    | [Contains]

    + chassis

        | [contains]
        + Board

             | [Contains]

             +  Port

                 |

                 | reference to /interfaces/interface

 

/interfaces

     |

     + interface

          | various augments depending on the if-type but

          | no "back-reference" to port in /entity

 

Problem is two-fold:

-          Recursiveness needs to be expressed in the XPATH statement: when
a client wants to create a port it needs to perform a check based on the
board identification.  So in case of Board A the maximum number of ports
that the client should be allowed to make is 8, for B it is 4, for D it is
16

-          From the interfaces table (for the VLAN port case) there is no
back reference to the entity table, so how would one retrieve the "board" on
top of which this interface has been defined in order to pick up the max
VLAN ports value if we would like to perform a must check in this (as the
value depends on the board identification).  So 100 in case the interface is
defined and an port of board D, 40 in case the interface is defined on a
port of board C (or B).  Should we then have to add a backwards leafref to
the port in /entity (otherwise this must statement will end up in a complete
/entity table look-up to find the port leafref matching the instance from
/interfaces)?

 

Is this something that can be expressed in YANG with XPATH expressions?  How
will that look like (and will that be understandable.)?  Don't we need
XQUERY to do this (which is not part of YANG)?

What is the performance of this (so in fact what is the impact on the
server)?  Is it recommended to do it that way and if not: how would you
suggest to model these kind of restrictions?

 

Thanks in advance.

 

Best regards - Vriendelijke groeten,

Bart Bogaert