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

Robert Wilton <rwilton@cisco.com> Tue, 14 February 2017 15:19 UTC

Return-Path: <rwilton@cisco.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 2174E1295F4 for <i2rs@ietfa.amsl.com>; Tue, 14 Feb 2017 07:19:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.523
X-Spam-Level:
X-Spam-Status: No, score=-14.523 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 MOuIDcB18wwU for <i2rs@ietfa.amsl.com>; Tue, 14 Feb 2017 07:19:11 -0800 (PST)
Received: from aer-iport-2.cisco.com (aer-iport-2.cisco.com [173.38.203.52]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6DCFE1295A1 for <i2rs@ietf.org>; Tue, 14 Feb 2017 07:19:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=8579; q=dns/txt; s=iport; t=1487085550; x=1488295150; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=FTFfXGzepNEbZEvsGBkXzYYhvsGZvoDiNs+cFj9g/Ts=; b=GyRhVH17Qj1lVX6A6conex4T/RVsnt7gHbJI5BHil5OijbCJHn2D1klK 71/S4K+SLZFlL5Pu9aapgfPR7l6LIQmijzU9sFPQvhh2DNa7eexIcKyhU di1KdCZtz6elDmHjh+lrxmHg66JbG49H1mv9LAHa9oKW9ikmCqgjU2uD/ 4=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BZAQA8H6NY/xbLJq1eGQEBAQEBAQEBAQEBBwEBAQEBhDMDJ1+NYXKRHpU2ggwfC4V4AoI6GAECAQEBAQEBAWIohGkBAQEDAQEBNjYbCw4KLicwBgEMBgIBAReJSAgOsTqLXAEBAQEBAQEBAQEBAQEBAQEBAQEBARgFhkyCBYJqhB0TBwEBBYV7BYkMhjeML4oPiAWBe4UXgy2GRosQiAUfOIEAIBQIFRU9hkNANQGHYwINFweCDwEBAQ
X-IronPort-AV: E=Sophos;i="5.35,161,1484006400"; d="scan'208";a="649637150"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2017 15:19:06 +0000
Received: from [10.63.23.109] (dhcp-ensft1-uk-vla370-10-63-23-109.cisco.com [10.63.23.109]) by aer-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id v1EFJ5e1027952; Tue, 14 Feb 2017 15:19:06 GMT
To: Kent Watsen <kwatsen@juniper.net>, "i2rs@ietf.org" <i2rs@ietf.org>
References: <AA7FA7D3-ED7B-4482-BBAC-7144E4944D92@juniper.net> <20170214.120910.763903356597953031.mbj@tail-f.com> <447B5293-75CE-4CE2-ADA4-D9E55EC7EA35@juniper.net>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <1df4c6fa-c8f1-43c1-780a-3860b1ccb358@cisco.com>
Date: Tue, 14 Feb 2017 15:19:02 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1
MIME-Version: 1.0
In-Reply-To: <447B5293-75CE-4CE2-ADA4-D9E55EC7EA35@juniper.net>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/i2rs/8UuoMVvEv28N77o-rhwB_u9MLEU>
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 15:19:13 -0000

Hi Kent,

I think that the answer depends on when this module needs to be published:

If it needs to be published now, then I think that it should follow the 
standard IETF config/state module conventions and use separate /foo and 
/foo-state trees.  This should make the module most widely usable.  
Would it help if the model defined two "require-instance false" 
dependency leaf refs, one to the potential underlay node in the config 
tree, and a second to the potential underlay node in the state tree?

Otherwise, if this model can be delayed until the revised datastores and 
I2RS work progresses then it could use a single combined config/state 
tree.  It seems that the revised datastore solution would allow for a 
simpler model to be constructed to represent network topologies.

Rob


On 14/02/2017 13:55, Kent Watsen wrote:
>
> [moving yang-doctors to BCC]
>
>
>>> 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?
> I'm referring to how the description statement explains that
> the server may look to operational state in order to resolve
> the leafref, which is to result in behavior similar to
> pre-configuration in RFC 7223.
>
>
>
>>>    b) complex server implementation (to handle require-instance false)
>> Can you elaborate on this one?
> This is primarily a reflection of the CON listed above, in that
> it seems that a server would need to have special handling for
> when dependencies transition from being present to not-present
> and vice versa, much like the code to handle when a physical
> card is plugged in or removed.
>
> Note: I should've listed this as a CON for OPTION 2 as well.
>
>
>
>>>    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.
> There are two primary differences:
>
> 1) It doesn't break legacy clients, because it requires the client to
>     explicitly pass a 'with-server-provided' flag in the <get-config>
>     request in order to get back the extended response.  Likewise, it
>     doesn't break backup/restore workflows, as the server can discard
>     any 'server-provided' nodes passed in an <edit-config> operation.
>     Lastly, it doesn't break <lock>/<unlock>, as there is no comingling
>     of opstate data in the 'running' datastore.
>
> 2) It doesn't say anything about how the opstate data is stored on the
>     server.  The opstate data is not modeled at all.  This approach
>     only defines a presentation-layer format for how opstate data can
>     be returned via an RPC.  The server is free to persist the opstate
>     data anyway it wants, perhaps in an internal datastore called
>     'operational-state' or in an uber-datastore with the opstate data
>     flagged with a datastore='oper-state' attribute.  Regardless, it's
>     an implementation detail, and the conceptual datastore model is
>     preserved.
>
>
>
>> /martin
> Kent
>
>
>
>
>>> 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
> .
>