[NGO] Re: [YANG] YANG augment-stmt
Martin Bjorklund <mbj@tail-f.com> Tue, 11 December 2007 20:30 UTC
Return-path: <ngo-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1J2Bk2-0004iF-ES; Tue, 11 Dec 2007 15:30:10 -0500
Received: from ngo by megatron.ietf.org with local (Exim 4.43) id 1J2Bk0-0004hg-Rj for ngo-confirm+ok@megatron.ietf.org; Tue, 11 Dec 2007 15:30:08 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1J2Bk0-0004h3-7W; Tue, 11 Dec 2007 15:30:08 -0500
Received: from [213.180.94.162] (helo=mail.tail-f.com) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1J2Bjz-00018c-FP; Tue, 11 Dec 2007 15:30:08 -0500
Received: from localhost (c213-100-166-13.swipnet.se [213.100.166.13]) by mail.tail-f.com (Postfix) with ESMTP id 6A12C1B80CC; Tue, 11 Dec 2007 21:30:06 +0100 (CET)
Date: Tue, 11 Dec 2007 21:26:16 +0100
Message-Id: <20071211.212616.122580787.mbj@tail-f.com>
To: ietf@andybierman.com
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <475EC4EA.30200@andybierman.com>
References: <475D68D5.50400@andybierman.com> <20071210.224647.240363363.mbj@tail-f.com> <475EC4EA.30200@andybierman.com>
X-Mailer: Mew version 5.1.51 on Emacs 22.1 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 36b1f8810cb91289d885dc8ab4fc8172
Cc: yang@ietf.org, ngo@ietf.org
Subject: [NGO] Re: [YANG] YANG augment-stmt
X-BeenThere: ngo@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: NETCONF Goes On - discussions on future work and extensions to NETCONF <ngo.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/ngo>, <mailto:ngo-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/ngo>
List-Post: <mailto:ngo@ietf.org>
List-Help: <mailto:ngo-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/ngo>, <mailto:ngo-request@ietf.org?subject=subscribe>
Errors-To: ngo-bounces@ietf.org
Andy Bierman <ietf@andybierman.com> wrote: > Martin Bjorklund wrote: > > Andy Bierman <ietf@andybierman.com> wrote: > >> Hi, > >> > >> Looking at the ABNF for the all-powerful augment statement, > >> I notice it can appear inside a list or inside an another augment, > >> anywhere a data-def-stmt can go in fact. > >> > >> Since this clause does not instantiate any data where it > >> located, but rather at the target specified by the augment-arg-str, > >> the containment for the augment seems pretty much irrelevant, > >> except that the augment could be nested within N different 'when' > >> statements, nested inside obsolete nodes, etc. > >> > >> The key in a list with an augment-stmt has no affect on the target data, > >> does it? > > > > I'm not sure I understand this question. > > > > > It seems strange to me to define an augment of 'some' other data > in a potentially different namespace, in the middle of the constructs > that define named list entries. But this isn't allowed. Only top-level augments can have absolute paths to augment. "Nested" augments MUST have descendant paths. > I'm not clear on the use-case, > which is why I cc:ed the NGO list. We need to agree on the requirements > for data model augmentation, just like every other part of > standard NETCONF content. Ok. > >> What does it mean to have an augment inside a grouping, so that > >> it is copied everywhere a 'uses' for that grouping is specified? > >> > >> What is the use-case for augment inside augment? > > > > The use case for augment inside anything but on the top-level is to be > > used in combination with 'uses'. The idea is that you can do 'uses > > foo', and then in a following augment add new nodes to the foo > > grouping: > > > > grouping server { > > leaf name { type string; } > > container address { > > leaf ip { type inet:ip-address; } > > } > > } > > > > container foo { > > uses server; > > augment address { > > leaf port { type inet:port-number; } > > } > > } > > Is this right? Don't you mean: > > container foo { > uses server { > augment address { > leaf port { type inet:port-number; } > } > } > } No, augment within a uses is not allowed. I do see your point though - if the use case is to allow augment of a 'uses', why not put the augment within the uses. The problem with this, as I see it, is that it might be confusing b/c all the other stmts with 'uses' are refinements of stmts found in the grouping. > I understand this use-case, where the descendant-schema-nodeid > is the target, instead of an absolute-schema-nodeid. > > I still don't see any use-case for augment-within-augment, augment /foo/bar { uses my-grouping; // defines a container 'baz' augment baz { leaf xxx { ... } } } > or allowing nested augments to modify data structures outside > their parent node. No, that is not allowed. > >> That means while you are defining extra data to attach to /acme:foo > >> you also define some extra data for /a:bar/b:baz? > > > > Yes. > > Why is this a feature, and what is it needed for? Sorry. My "Yes" should have been "No!!". > We should base the solution (DML) on the agreed-upon requirements. > The requirements should be based upon real use-cases. Absolutely. > IMO, there is a need for top-level augment clauses that name the target > with an absolute path expression, as well as nested augment clauses > that extend the data within their containment node (container, list, > choice/case-foo, rpc/input, rpc/output, notification). It is > the DM writers choice which form to use. > > You should use descendant form if 'when' clauses exist in any > ancestor nodes, instead of replicating the effective Xpath 'when' > expression for a top-level clause. I don't see how this has anything to do with 'when'...? > It boils down to 1 simple CLR: > > A top-level augment-stmt must use the absolute form, > and a nested augment-stmt must use the descendant form > of the schema-nodeid target of the augmentation. > (A top-level augment-stmt has no context for descendants.) This is already in the draft. > The ABNF does not reflect this, or that only a choice augment > can use the case-stmt, or only an RPC augment can use the > input-stmt | output-stmt. Yes you're right, we should make this change in the ABNF. Currently it's just in the text. /martin _______________________________________________ NGO mailing list NGO@ietf.org https://www1.ietf.org/mailman/listinfo/ngo
- [NGO] YANG augment-stmt Andy Bierman
- [NGO] Re: [YANG] YANG augment-stmt Martin Bjorklund
- [NGO] Re: [YANG] YANG augment-stmt Martin Bjorklund
- [NGO] Re: [YANG] YANG augment-stmt Balazs Lengyel
- [NGO] Re: [YANG] YANG augment-stmt Andy Bierman
- [NGO] Re: [YANG] YANG augment-stmt Martin Bjorklund