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

Martin Bjorklund <mbj@tail-f.com> Tue, 14 February 2017 11:09 UTC

Return-Path: <mbj@tail-f.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 ECB00129568; Tue, 14 Feb 2017 03:09:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-0.001, 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 5H9puXUe5ZCf; Tue, 14 Feb 2017 03:09:13 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id E9CAD1293E8; Tue, 14 Feb 2017 03:09:12 -0800 (PST)
Received: from localhost (unknown [173.38.220.40]) by mail.tail-f.com (Postfix) with ESMTPSA id CCD4A1AE034F; Tue, 14 Feb 2017 12:09:10 +0100 (CET)
Date: Tue, 14 Feb 2017 12:09:10 +0100
Message-Id: <20170214.120910.763903356597953031.mbj@tail-f.com>
To: kwatsen@juniper.net
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <AA7FA7D3-ED7B-4482-BBAC-7144E4944D92@juniper.net>
References: <AA7FA7D3-ED7B-4482-BBAC-7144E4944D92@juniper.net>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/i2rs/xNrByur-CFft0eiJVU-gA22061s>
Cc: i2rs@ietf.org, yang-doctors@ietf.org
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: Tue, 14 Feb 2017 11:09:15 -0000

Hi,

Kent Watsen <kwatsen@juniper.net> wrote:
> Hi All,
> 
> It's been quiet on the list as a small group of us (Alex, Xufeng,
> Pavan, and myself) went offline to discuss for a bit before bringing
> back to the group, which I'm doing now.
> 
> Regarding resolving the modeling the issue, we went through nearly a
> dozen ideas that we've narrowed down to two.  We discussed the
> pros/cons, but since we each emphasize different values, we were
> unable to reach a consensus amongst ourselves.  We're hoping that
> bringing the discussion here will bring more perspectives and resolve
> this issue.
> 
> 
> OPTION 1: separate /foo and /foo-state trees
> --------------------------------------------
> 
> This option was/is described here:
> https://www.ietf.org/mail-archive/web/i2rs/current/msg04316.html.
> 
> PROS:
>   a) does NOT break legacy clients (how we got here)
>   b) consistent with convention used in many IETF modules
>   c) able to show if/how opstate may differ from configured values
> 
> CONS:
>   a) questionably valid YANG leafref usage

What does this mean?

>   b) complex server implementation (to handle require-instance false)

Can you elaborate on this one?

>   c) eventually the module would need to migrate to the long-term 
>      solution, which would result in needing to also rewrite all
>      modules that have augmented it (e.g., ietf-te-topology).
>   d) leafref path expressions really only work for configuration data,
>      though a clever server could have a special ability to peak at
>      the opstate values when doing validations.  Of course, with 
>      require-instance is false, the value of leafref based validation
>      checking is negated anyway, even for config true nodes, so this
>      may not matter much.
> 
> 
> 
> OPTION 2: explicit client-option to also return tagged opstate data
> -------------------------------------------------------------------
> 
> This option takes a couple forms.  The first is module-specific and
> the second is generic.  In both cases, the idea is modeled after the
> with-defaults solution (RFC6243), wherein the client passes a special
> flag into <get-config> causing the server to also return opstate data,
> having a special metadata flag set, intermingled with the
> configuration
> data.
> 
> 
> 2A: Module-specific version
> 
>    module foo {
>       import ietf-netconf { prefix nc; }
>       import ietf-yang-metadata { prefix md; }
>       md:annotation server-provided {
>          type boolean;
>       }
>       container nodes {
>          config true;
>          list node {
>             key "name";
>             leaf name { type string; }
>             leaf dependency {
>                type leafref {
>                  path "../node/name"
>                  require-instance false;
>                }
>             }
>          }
>       }
>       augment /nc:get-config/nc:input {
>          leaf with-server-provided {
>             type boolean;
>          }
>       }
>    }

I don't think this solution is substantially different from the
solution in draft-ietf-i2rs-yang-network-topo-10.  You have just moved
a config false leaf to a meta-data annotation.  This solution suffers
from the same problems as the solution in
draft-ietf-i2rs-yang-network-topo-10.



/martin




> 
> For instance:
> 
>   <get-config>
>     <source>
>       <running/>
>     </source>
>     <with-server-provided/>
>    </get-config>
> 
>    <data>
>      <nodes>
>        <node>
>          <name>overlay-node</name>
>          <dependency>underlay-node</dependency>
>        </node>
>        <node foo:server-provided='true'>
>          <name>underlay-node</name>
>        </node>
>      </nodes>
>    </data>
> 
> PROS:
>   a) does NOT break legacy clients (how we got here)
>   b) having all data in one merged tree is simpler to process 
>      than two separate queries.
>   c) module doesn't have to be rewritten for revised-datastores;
>      the 'with-server-provided' switch would just not be passed
>      by new opstate-aware clients.
> 
> CONS:
>   a) inconsistent with convention used in many IETF modules
>   b) unclear how to model 'with-server-provided' for RESTCONF
>      (just use a description statement to define a query param?)
>   c) unable to return the opstate value for any configured node
>      (is it needed here?)
>   d) requires server to support metadata, which is a relatively
>      new concept and maybe not well supported by servers.
>   e) only changes presentation-layer (doesn't change the fact 
>      that 'server-provided' data is not configuration), thus the
>      leafref path expressions still don't work quite the way as
>      desired, though a clever server could have a special ability
>      to peak at the opstate values when doing validations. Of 
>      course, with require-instance is false, the value of leafref
>      based validation checking is negated anyway, even for config
>      true nodes, so this may not matter much.
> 
> 
> 
> 
> 2B: Generic version
> 
> The generic version is much the same, but rather than letting the
> solution be limited to this one module, the idea is to generalize
> it so it could be a server-level feature.  Having a generic RPC to
> return data from more than one DS at a time was something that was
> discussed ~1.5 years ago when we were kicking off the opstate effort.
> 
> The PROS and CONS are similar, but there are additional CONS in the
> generic case.  The main ones being 1) how to simultaneously return 
> both the config and opstate values for a node (split at the leaves)
> and 2) how to handle some YANG statements such as presence containers
> and choice nodes.  For this reason, (2B) is NOT considered a viable
> solution and is only here so that it's clear that it was discussed.
> 
> 
> 
> If there are any other options people want to suggest, please do so
> now!
> 
> Thanks,
> Kent
> 
> 
> 
> _______________________________________________
> i2rs mailing list
> i2rs@ietf.org
> https://www.ietf.org/mailman/listinfo/i2rs
>