[NGO] Re: [YANG] YANG augment-stmt
Andy Bierman <ietf@andybierman.com> Tue, 11 December 2007 17:11 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 1J28dU-0002ZI-JP; Tue, 11 Dec 2007 12:11:12 -0500
Received: from ngo by megatron.ietf.org with local (Exim 4.43) id 1J28dT-0002YW-CN for ngo-confirm+ok@megatron.ietf.org; Tue, 11 Dec 2007 12:11:11 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1J28dT-0002YG-0t for ngo@ietf.org; Tue, 11 Dec 2007 12:11:11 -0500
Received: from smtp124.sbc.mail.sp1.yahoo.com ([69.147.64.97]) by chiedprmail1.ietf.org with smtp (Exim 4.43) id 1J28dS-0002Xy-AN for ngo@ietf.org; Tue, 11 Dec 2007 12:11:10 -0500
Received: (qmail 16978 invoked from network); 11 Dec 2007 17:11:09 -0000
Received: from unknown (HELO ?192.168.0.10?) (andybierman@att.net@68.120.85.122 with plain) by smtp124.sbc.mail.sp1.yahoo.com with SMTP; 11 Dec 2007 17:11:09 -0000
X-YMail-OSG: h_mVAeYVM1mf.gcYWDpsb_WSEzmwuQFjkACLb5quY7tis_TN
Message-ID: <475EC4EA.30200@andybierman.com>
Date: Tue, 11 Dec 2007 09:12:10 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Martin Bjorklund <mbj@tail-f.com>
References: <475D68D5.50400@andybierman.com> <20071210.224647.240363363.mbj@tail-f.com>
In-Reply-To: <20071210.224647.240363363.mbj@tail-f.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: b1c41982e167b872076d0018e4e1dc3c
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
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. 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. >> 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; } } } } 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, or allowing nested augments to modify data structures outside their parent node. > > Or the same thing as a reusable grouping: > > grouping server-with-port { > uses server; > augment address { > leaf port { type inet:port-number; } > } > } > > This way extensions to groupings ("complex types":) can be defined. > >> 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? > >> I have only seen augment examples that appear at the top-level. >> Are there real examples of data models that actually need to >> nest the augment-stmt anywhere and everywhere in the data model, >> even inside the 'input' clause for an RPC method definition? >> >> What are the requirements for WG or vendor data model augmentation exactly? > > I'm not sure I understand this question either. > We should base the solution (DML) on the agreed-upon requirements. The requirements should be based upon real use-cases. 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. 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.) 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. > > /martin > > Andy _______________________________________________ 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