Re: [i2rs] modeling options for draft-ietf-i2rs-yang-network-topo
Andy Bierman <andy@yumaworks.com> Mon, 20 February 2017 18:47 UTC
Return-Path: <andy@yumaworks.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 B15131294C7 for <i2rs@ietfa.amsl.com>; Mon, 20 Feb 2017 10:47:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 KGg3cU9n15ji for <i2rs@ietfa.amsl.com>; Mon, 20 Feb 2017 10:47:18 -0800 (PST)
Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F3885129494 for <i2rs@ietf.org>; Mon, 20 Feb 2017 10:47:17 -0800 (PST)
Received: by mail-wm0-x230.google.com with SMTP id c85so88214041wmi.1 for <i2rs@ietf.org>; Mon, 20 Feb 2017 10:47:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=v1nB2MIS982xgwEptsp7ApTgF7CabVugeHE7GmK6hSI=; b=GcpNBUF4n7UyvGzvloEiiHguvs58MYxIq0FAmax8t8pBdwdn5eGOExepf+nQTew4Ae WcBtu2x8fKkpcSkpdeiRAjcyt+4GuTJ0sKp4djO/9rdXQgjJFRDb/vHOk2AlR0NdACEy UI/0JnEYuj9DJjWgP5VTX1Wl3Jfbbvm7buw44YsBPFMp5x4SJaGk5HhhgCSBm6foBkRY 96nE1IaeN08MgbY1eo34E1W1VYYpLGf84dDDT5/4Nd5ifFciVJ1sSJHWzCCyumFQoaWP gpxv7kY5eLDQ5VkaLrAlvlSHYMMchdLwzqDLvGVkDrSAMFnG3cHWU9FH0WtBpS6/OjfP S12A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=v1nB2MIS982xgwEptsp7ApTgF7CabVugeHE7GmK6hSI=; b=EDj3CacODxAwYjQ66fSKW4FqoSRK07QTyQsuHEXHV8roRoYlt+2qfglI0cWmyb6tFI gfkB4u+P3jKSRXqLuNDpcCwAUoUVXpDtAq5Kmgw/1Zw372LcVmRYMoqpSJT5EPf68pg5 6OQ128BSEIJ91YWxojS+0AwIjDhVLirG3ny+Bb9OsArlwLDTHfQ45b0CUOwWqo83t9U9 t0+F+ZC+0Dk6FJVFUz3oj07Bs+FRZkaALbXZK2HUiqKJZVPuLIWi7jwmHhvskSicZ30X SlSzMMb3g36fxcKY3b1Mw94Cejy/gXIH/6wok5qj/Bsm7Hp5R2pH9sFhjpAEz3ZJgTHe /oCQ==
X-Gm-Message-State: AMke39kv/zzIOzOAtNfvWyf5NgN3qcMydyEyjKrI3+xUxqvoalpmQSv+PwfCNfsecX+o3WEFsMDg5ANQoubrCg==
X-Received: by 10.28.103.3 with SMTP id b3mr19150980wmc.99.1487616436410; Mon, 20 Feb 2017 10:47:16 -0800 (PST)
MIME-Version: 1.0
Received: by 10.223.165.154 with HTTP; Mon, 20 Feb 2017 10:47:15 -0800 (PST)
In-Reply-To: <20170216.221949.1797970554181706414.mbj@tail-f.com>
References: <447B5293-75CE-4CE2-ADA4-D9E55EC7EA35@juniper.net> <20170214.174106.332845199336010868.mbj@tail-f.com> <007601d2886a$bf085170$3d18f450$@gmail.com> <20170216.221949.1797970554181706414.mbj@tail-f.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Mon, 20 Feb 2017 10:47:15 -0800
Message-ID: <CABCOCHRiTWk-EPtu4p-6ryYWUhSVrf+MKom_vwEF73srHfckwg@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Content-Type: multipart/alternative; boundary="001a114a91b24148b40548fab1b1"
Archived-At: <https://mailarchive.ietf.org/arch/msg/i2rs/tt4um-cr1c-QnkqIpXvwLa5M0YE>
Cc: "i2rs@ietf.org" <i2rs@ietf.org>, Kent Watsen <kwatsen@juniper.net>, Xufeng Liu <xufeng.liu.ietf@gmail.com>
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: Mon, 20 Feb 2017 18:47:21 -0000
On Thu, Feb 16, 2017 at 1:19 PM, Martin Bjorklund <mbj@tail-f.com> wrote: > "Xufeng Liu" <xufeng.liu.ietf@gmail.com> wrote: > > > > > > > -----Original Message----- > > > From: i2rs [mailto:i2rs-bounces@ietf.org] On Behalf Of Martin > Bjorklund > > > Sent: Tuesday, February 14, 2017 11:41 AM > > > To: kwatsen@juniper.net > > > Cc: i2rs@ietf.org > > > Subject: Re: [i2rs] modeling options for draft-ietf-i2rs-yang-network- > topo > > > > > > Kent Watsen <kwatsen@juniper.net> 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. > > > > > > Ok, I didn't pay close attention to the proposal in the quoted email. > > > > > > I would design this a bit differently. The config true leaf > "dependency" > > should > > > have a leafref to the config false node name, with require-instance > false. > > The > > > description should explain that the configuration item will be used by > the > > server > > > if all dependencies exist. When the configuration item is used, it > shows > > up in the > > > config false list. > > > > > > This way, the leafref usage is valid and straight forward. > > > > > > > >> 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. > > > > > > Yes, but I think this is inherent to the problem at hand. Even with > the > > config true > > > solution defined in the current draft, it is not clear how things that > > were created > > > by the server would be deleted (if there were references to them). > > > > > > > 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 > > > > > > The solution in the draft doesn't break legacy clients either - > there's a > > config > > > false leaf among the config true. No problem. > > > > > > > , 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. > > > > > > Huh? This goes against the defined behavior of 6241 + 7950. This is > the > > main > > > problem with the solution in the current draft. > > > > > > If a client sends a <get-config> for data in running, the server cannot > > send back > > > data that is not in running. > > > > > > > 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. > > > > > > You are essentially defining a new operation, but do it by modifying > the > > > semantics of an existing one. I don't think this is a good idea; it is > > better to > > > define a new rpc. > > > > [Xufeng] Is using a new rpc is acceptable? If so, this could be a viable > > option. > > The draft-ietf-netmod-revised-datastores proposes a new rpc (maybe > <get-data>) to return data from the new operational-state datastore. > This is IMO better than adding opstate nodes to the reply to a > <get-config> request. > > +1 There are billions of combinations of letters than can be used as YANG identifiers. The letters "get-config" are already used. Pick a different combination. > > /martin > Andy > > _______________________________________________ > i2rs mailing list > i2rs@ietf.org > https://www.ietf.org/mailman/listinfo/i2rs >
- [i2rs] modeling options for draft-ietf-i2rs-yang-… Kent Watsen
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Martin Bjorklund
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Kent Watsen
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Robert Wilton
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Martin Bjorklund
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Alexander Clemm
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Martin Bjorklund
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Alexander Clemm
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Martin Bjorklund
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Alexander Clemm
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Kent Watsen
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Martin Bjorklund
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Xufeng Liu
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Xufeng Liu
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Susan Hares
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Susan Hares
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Xufeng Liu
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Susan Hares
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Martin Bjorklund
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Xufeng Liu
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Xufeng Liu
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Martin Bjorklund
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Kent Watsen
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Susan Hares
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Kent Watsen
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Andy Bierman
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Martin Bjorklund
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Susan Hares
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Martin Bjorklund
- Re: [i2rs] modeling options for draft-ietf-i2rs-y… Susan Hares