Re: [netmod] Augmentation to Groupings

Robert Wilton <> Fri, 22 December 2017 14:33 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id B220212EAC5 for <>; Fri, 22 Dec 2017 06:33:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -14.51
X-Spam-Status: No, score=-14.51 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Xjp1EclU_Utp for <>; Fri, 22 Dec 2017 06:33:19 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 63E8912EAC1 for <>; Fri, 22 Dec 2017 06:33:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;;; l=9722; q=dns/txt; s=iport; t=1513953198; x=1515162798; h=from:subject:to:references:message-id:date:mime-version: in-reply-to; bh=675T4vwjrVEpEj4AExVNkmb0Dd9FkgVJuPcTpQU3Iyo=; b=FJAn97YtwLG5T7OQf3XI+x0b40YHhDtt7YnJoL5CcTRh3kP0ywlzP89S glxXgLR3e5z3ETg10p9ON65OJOXibZ54F/N3tvY9kVx3J0Ee6XuLB6Kjf 5xL5F4KZzkUpx1Wi2eNhW79EYYwVbwHlbxSkAB49hTz0qMT67PgP+AWVG g=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-AV: E=Sophos;i="5.45,441,1508803200"; d="scan'208,217";a="1085196"
Received: from (HELO ([]) by with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Dec 2017 14:33:15 +0000
Received: from [] ( []) by (8.14.5/8.14.5) with ESMTP id vBMEXFP5017872; Fri, 22 Dec 2017 14:33:15 GMT
From: Robert Wilton <>
To: Alexander Clemm <>, Xufeng Liu <>, NETMOD WG <>
References: <> <20171219191528.2snk3ahnipxcojtb@elstar.local> <> <20171219201647.pgywfiws5avnyaul@elstar.local>
Message-ID: <>
Date: Fri, 22 Dec 2017 14:33:15 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
MIME-Version: 1.0
In-Reply-To: <20171219201647.pgywfiws5avnyaul@elstar.local>
Content-Type: multipart/alternative; boundary="------------0CC632C427D199B999C45F9F"
Content-Language: en-US
Archived-At: <>
Subject: Re: [netmod] Augmentation to Groupings
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 22 Dec 2017 14:33:21 -0000

Some YANG models make very heavy usage of groupings, and in many cases 
where I have seen them used extensively that makes the YANG model far 
less readable.  So one solution here may be to use less groupings. :-)

I agree with the point that others have made that allowing a grouping to 
be augmented globally is probably not a good idea because it could end 
up modifying arbitrary YANG modules.

A couple of other potential solutions could be:

1) Consider a mechanism where a single augment statement can augment 
multiple paths in the schema tree (i.e. reducing repetition of the added 
data nodes, but still keeping the explicitness).
2) Allowing augmentation to a grouping, but have that augmentation only 
apply to "uses" statement within the same YANG module file. This 
approach would seem to have some corner cases that would need to be 
carefully considered (e.g. sub-modules, or if a grouping uses another 
grouping).  It might also be hard to instinctively know or describe 
where the grouping would apply.

Perhaps this issue should be listed on the issue tracker, to 
be considered in a future revision of YANG?


On 19/12/2017 20:16, Juergen Schoenwaelder wrote:
> The question is not why we have groupings, the question is why
> augmentations are restricted to schema node identifiers. I provided an
> answer for the later, namely explicit control of augmentation effects.
> It is of course OK to disagree with the design. I am just trying to
> explain that this was an explicit design decision when YANG was
> designed.
> /js
> On Tue, Dec 19, 2017 at 07:51:05PM +0000, Alexander Clemm wrote:
>> IMHO it would be worth a try.  If you wanted to only augment _some_ uses of a grouping, you could still do the same as today.  Also, I would expect augmentations to only affect servers that support the module defining the augmentation.  If verbosity were not an issue, why were groupings introduced in the first place?
>> --- Alex
>>> -----Original Message-----
>>> From: netmod [] On Behalf Of Juergen
>>> Schoenwaelder
>>> Sent: Tuesday, December 19, 2017 11:15 AM
>>> To: Xufeng Liu<>
>>> Cc: NETMOD WG<>
>>> Subject: Re: [netmod] Augmentation to Groupings
>>> The current approach may be verbose but it protects users of groupings from
>>> unwanted and uncontrolled side effects. Augmenting a grouping as
>>> suggested affects _all_ uses of a grouping; this can be tricky in situations
>>> where groupings are widely used.
>>> /js
>>> On Tue, Dec 19, 2017 at 11:45:06AM -0500, Xufeng Liu wrote:
>>>> During the discussions of TE tunnel and topology models, we have found
>>>> that it is desirable to have the capability of augmenting a grouping.
>>>> In our case, there are multiple technology specific models augmenting
>>>> a base generic model. In the base model, some groupings are used
>>>> multiple times, and each augmentation model needs to add more schema
>>>> nodes to the grouping structure. For now, we have to specify an
>>>> “augment” statement for each location where the grouping is used. Such
>>>> an “augment” statement is repeated many times. It would be convenient
>>>> and cleaner if we could augment the grouping.
>>>> We’d like to hear opinions on the feasibility of such a capability.
>>>> Thanks,
>>>> - Xufeng
>>>> _______________________________________________
>>>> netmod mailing list
>>> --
>>> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
>>> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
>>> Fax:   +49 421 200 3103<>
>>> _______________________________________________
>>> netmod mailing list