Re: [i2rs] modeling options for draft-ietf-i2rs-yang-network-topo

Alexander Clemm <alexander.clemm@huawei.com> Wed, 15 February 2017 18:24 UTC

Return-Path: <alexander.clemm@huawei.com>
X-Original-To: i2rs@ietfa.amsl.com
Delivered-To: i2rs@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D742A129B13 for <i2rs@ietfa.amsl.com>; Wed, 15 Feb 2017 10:24:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.221
X-Spam-Level:
X-Spam-Status: No, score=-4.221 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-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 iifAFZmSjkK5 for <i2rs@ietfa.amsl.com>; Wed, 15 Feb 2017 10:24:48 -0800 (PST)
Received: from lhrrgout.huawei.com (lhrrgout.huawei.com [194.213.3.17]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9D294129ACB for <i2rs@ietf.org>; Wed, 15 Feb 2017 10:24:47 -0800 (PST)
Received: from 172.18.7.190 (EHLO lhreml703-cah.china.huawei.com) ([172.18.7.190]) by lhrrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DGO02893; Wed, 15 Feb 2017 18:24:45 +0000 (GMT)
Received: from LHREML712-CAH.china.huawei.com (10.201.108.35) by lhreml703-cah.china.huawei.com (10.201.5.104) with Microsoft SMTP Server (TLS) id 14.3.301.0; Wed, 15 Feb 2017 18:24:37 +0000
Received: from SJCEML701-CHM.china.huawei.com (10.208.112.40) by LHREML712-CAH.china.huawei.com (10.201.108.35) with Microsoft SMTP Server (TLS) id 14.3.301.0; Wed, 15 Feb 2017 18:24:36 +0000
Received: from SJCEML703-CHM.china.huawei.com ([169.254.5.69]) by SJCEML701-CHM.china.huawei.com ([169.254.3.132]) with mapi id 14.03.0235.001; Wed, 15 Feb 2017 10:24:31 -0800
From: Alexander Clemm <alexander.clemm@huawei.com>
To: Martin Bjorklund <mbj@tail-f.com>
Thread-Topic: [i2rs] modeling options for draft-ietf-i2rs-yang-network-topo
Thread-Index: AQHShm7DGX1TjHFotkqv+yitC/fU9qFo3scAgAAukoCAAC4rAIAACldwgAD514CAACAzkA==
Date: Wed, 15 Feb 2017 18:24:30 +0000
Message-ID: <644DA50AFA8C314EA9BDDAC83BD38A2E0DF80493@SJCEML703-CHM.china.huawei.com>
References: <447B5293-75CE-4CE2-ADA4-D9E55EC7EA35@juniper.net> <20170214.174106.332845199336010868.mbj@tail-f.com> <644DA50AFA8C314EA9BDDAC83BD38A2E0DF80205@SJCEML703-CHM.china.huawei.com> <20170215.091219.721914825568257957.mbj@tail-f.com>
In-Reply-To: <20170215.091219.721914825568257957.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.213.48.84]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-CFilter-Loop: Reflected
X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.58A49CED.029C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.5.69, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32
X-Mirapoint-Loop-Id: 421a5ff6348e06f086431402a07a4120
Archived-At: <https://mailarchive.ietf.org/arch/msg/i2rs/vEYQPyw67cn4_wWpXZ2mb9ZOe9Y>
Cc: "i2rs@ietf.org" <i2rs@ietf.org>, "kwatsen@juniper.net" <kwatsen@juniper.net>
Subject: Re: [i2rs] modeling options for draft-ietf-i2rs-yang-network-topo
X-BeenThere: i2rs@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Interface to The Internet Routing System \(IRS\)" <i2rs.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/i2rs>, <mailto:i2rs-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/i2rs/>
List-Post: <mailto:i2rs@ietf.org>
List-Help: <mailto:i2rs-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/i2rs>, <mailto:i2rs-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Feb 2017 18:24:51 -0000

Hello Martin,  
Thank you.  Your first explanation is clear.  Regarding the expression of constraints, see inline, below (thread is pruned for clarity)
--- Alex

-----Original Message-----
From: Martin Bjorklund [mailto:mbj@tail-f.com] 
Sent: Wednesday, February 15, 2017 12:12 AM
To: Alexander Clemm <alexander.clemm@huawei.com>
Cc: kwatsen@juniper.net; i2rs@ietf.org
Subject: Re: [i2rs] modeling options for draft-ietf-i2rs-yang-network-topo


<snip>
.................
I mean that the server will consider a configured item, and decide if it can be used or not.  If the configured item has a reference to something that doesn't (yet) exist (weak reference; require-instance false), the server leaves the item in the config, and moves on.  At some later time, suppose the weak reference is fulfilled; at this point the server decides that the configured item can be used, and it instantiates the item in the /-state list.  Once it is there, maybe some other configured item has a reference to this one, and it can also be instantiated etc.

And it goes the other way as well; suppose a server provided item is removed by the server; at this point the server would also remove items in the state list that originated in the configuration - however they are not removed from the config, just the state.
(Server provided items would only show up in the state in this solution).

The state subtree works exactly like the operational-state datastore in draft-ietf-netmod-revised-datastores.

<ALEX>
Thank you, this clarifies the earlier statement
</ALEX>

> One of the issues that we are facing is that a configured topology 
> might refer to a configured topology or a server-provided topology, 
> and we would like to avoid making a case distinction as to which 
> category we are referring to.

I believe my proposed solution handles this.

> At the same time, we are making use of leafrefs to express a number of 
> integrity constraints which are part of the model: as a node is part 
> of a topology, and a topology has an underlay topology, we make sure 
> that the underlay node is part of the underlay topology (and not just 
> any arbitrary node).

Can you point me to the place in the model where this is specified?

Or did you mean that today you have to mention this in plain text, but it would be nice if it could be captured formally in the model?

<ALEX>  It is covered in the model today. E.g.:

In networks/network/node/supporting-node 
             leaf network-ref {
               type leafref {
                 path "../../../supporting-network/network-ref";
               require-instance false;
               }
(supporting node is contained in supporting network)

Supporting link:
      +--rw supporting-link* [network-ref link-ref]
         +--rw network-ref    -> ../../../nd:supporting-network/network-ref
         +--rw link-ref       -> /nd:networks/network[nd:network-id=current()/../network-ref]/link/link-id

(supporting link is a link contained in the supporting network)

Supporting termination point:
      +--rw supporting-termination-point* [network-ref node-ref tp-ref]
         +--rw network-ref    -> ../../../nd:supporting-node/network-ref
         +--rw node-ref       -> ../../../nd:supporting-node/node-ref
         +--rw tp-ref         -> /nd:networks/network[nd:network-id=current()/../network-ref]/node[nd:node-id=current()/../node-ref]/termination-point/tp-id

(supporting termination point is contained in supporting network and supporting node)

It is those leafrefs whose transposition in the split subtree model (where we encounter alternative paths) I am concerned will be problematic.  

</ALEX>