Re: [netmod] uses and augment
Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Fri, 24 March 2017 06:31 UTC
Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C39EF1316D1 for <netmod@ietfa.amsl.com>; Thu, 23 Mar 2017 23:31:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.701
X-Spam-Level:
X-Spam-Status: No, score=-3.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-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 af2ilTOVOwkY for <netmod@ietfa.amsl.com>; Thu, 23 Mar 2017 23:31:37 -0700 (PDT)
Received: from atlas3.jacobs-university.de (atlas3.jacobs-university.de [212.201.44.18]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 538C11316D2 for <netmod@ietf.org>; Thu, 23 Mar 2017 23:31:36 -0700 (PDT)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas3.jacobs-university.de (Postfix) with ESMTP id 2914D1451; Fri, 24 Mar 2017 07:31:35 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas3.jacobs-university.de ([10.70.0.205]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10030) with ESMTP id ZVSdGMtjJ4g4; Fri, 24 Mar 2017 07:31:32 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas3.jacobs-university.de (Postfix) with ESMTPS; Fri, 24 Mar 2017 07:31:34 +0100 (CET)
Received: from localhost (demetrius1.jacobs-university.de [212.201.44.46]) by hermes.jacobs-university.de (Postfix) with ESMTP id 9442420035; Fri, 24 Mar 2017 07:31:34 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius1.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id LlQ0f2iQOBkG; Fri, 24 Mar 2017 07:31:34 +0100 (CET)
Received: from elstar.local (elstar.jacobs.jacobs-university.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id 0BA8920031; Fri, 24 Mar 2017 07:31:33 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501) id BBD873EF8621; Fri, 24 Mar 2017 07:31:38 +0100 (CET)
Date: Fri, 24 Mar 2017 07:31:38 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: "Dale R. Worley" <worley@ariadne.com>
Cc: netmod@ietf.org
Message-ID: <20170324063138.GA42195@elstar.local>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: "Dale R. Worley" <worley@ariadne.com>, netmod@ietf.org
References: <20170322.212411.1191940569571241434.mbj@tail-f.com> <87y3vvpkev.fsf@hobgoblin.ariadne.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <87y3vvpkev.fsf@hobgoblin.ariadne.com>
User-Agent: Mutt/1.6.0 (2016-04-01)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/lFysbxCVPSdhWFRzOWcaxgmA37Q>
Subject: Re: [netmod] uses and augment
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Mar 2017 06:31:40 -0000
On Thu, Mar 23, 2017 at 08:50:48PM -0400, Dale R. Worley wrote: > Martin Bjorklund <mbj@tail-f.com> writes: > >> I notice that "augment" is not allowed to target a "grouping", despite > >> that naively seems to be an operation that a module designer might like > >> to do. I expect that there is a reason why this is not allowed. > > > > There were lots of debate over this one when we first designed YANG. > > The main reason for not allowing this is that it can easily have > > unintended consequences. Module A uses a grouping G b/c it fits the > > purpose. Later someone augments G with some nodes; at this point it > > is not at all clear that the additional nodes are suitable for module > > A. > > True... But assuming that the grouping G has clean semantics, it > corresponds to some facility in the device, which in some way or another > appears in multiple places in the device's data model. And a module > that augments G adds semantics about that facility, and would only be > implemented by a device for which the facility uniformly has that > additional semantics. So it would be suitable for every place where the > grouping is used. But this is an assumption and it is not generally true. [...] > But what I'm considering is a modification of > the grouping which implicitly applies to all "uses" of that grouping -- > because you don't want to have duplicate declarations of the added nodes > in every place the grouping is used. There may be cases where this may appear useful but I see also cases where people will get largely suprised by the result if such wildcard augmentations would be possible. > > Augments are restricted to things that have a well defined name in the > > data tree because this makes it clear what is being augmented. One > > would have to create additional language constructs to make > > augmentations of groupings work. > > It's clear that *groupings* have well-defined names, because "uses" > statements can refer to them. I wrote 'name in the data tree' and I meant 'name in the schema tree' (sorry). Augments apply to something that has a name in the schema tree, groupings do not have that. The "grouping" statement is not a data definition statement and, as such, does not define any nodes in the schema tree. > RFC 7950 section 7.13 isn't particularly > clear about how the argument string of the statement is to be > interpreted, but going back over 7950, I'm getting the idea that the > names of groupings are not descendant-schema-nodeid's, that is, named > based on where the grouping statement sits in the syntactic hierarchy, > but are in a separate namespace which is flat regarding equality and > inequality comparisons, but has elaborate scoping rules regarding which > groupings are visible in which locations. Yes. > OK, that clarifies why you can't apply "augment" to a grouping -- > groupings (and thus the things defined within them) don't have names > that can be expressed by descendant-schema-nodeid's. Yes. This is how things were defined. /js -- Juergen Schoenwaelder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany Fax: +49 421 200 3103 <http://www.jacobs-university.de/>
- [netmod] uses and augment Dale R. Worley
- Re: [netmod] uses and augment Martin Bjorklund
- Re: [netmod] uses and augment Juergen Schoenwaelder
- Re: [netmod] uses and augment Dale R. Worley
- Re: [netmod] uses and augment Andy Bierman
- Re: [netmod] uses and augment Juergen Schoenwaelder