Re: [netmod] Augmentation to Groupings

Robert Wilton <rwilton@cisco.com> Fri, 22 December 2017 14:33 UTC

Return-Path: <rwilton@cisco.com>
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 B220212EAC5 for <netmod@ietfa.amsl.com>; Fri, 22 Dec 2017 06:33:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.51
X-Spam-Level:
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: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 Xjp1EclU_Utp for <netmod@ietfa.amsl.com>; Fri, 22 Dec 2017 06:33:19 -0800 (PST)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 63E8912EAC1 for <netmod@ietf.org>; Fri, 22 Dec 2017 06:33:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; 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-Anti-Spam-Result: A0B3AQA1Fz1a/xbLJq1aAxkBAQEBAQEBAQEBAQEHAQEBAQGDD4EVdCeEBosYkB+JBohRh2YKGAEKhElPAoURFAEBAQEBAQEBAWsohSMBAQEBAwEBIUsXAgILEAEEAQEBJwMCAhsGBh8JCAYBDAYCAQEXiXsDFRCkeYInJocSDYMOAQEBAQEBAQEBAQEBAQEBAQEBAQEBHQWEB4NogWkpgwWCa0QBgg8mglCCZQWjDD2QMYR+jBiHYo1fgRuIBYE7NiKBTzIaCBsVPYIpCYROQTcBijQBAQE
X-IronPort-AV: E=Sophos;i="5.45,441,1508803200"; d="scan'208,217";a="1085196"
Received: from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Dec 2017 14:33:15 +0000
Received: from [10.63.23.84] (dhcp-ensft1-uk-vla370-10-63-23-84.cisco.com [10.63.23.84]) by aer-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id vBMEXFP5017872; Fri, 22 Dec 2017 14:33:15 GMT
From: Robert Wilton <rwilton@cisco.com>
To: Alexander Clemm <alexander.clemm@huawei.com>, Xufeng Liu <xufeng.liu.ietf@gmail.com>, NETMOD WG <netmod@ietf.org>
References: <CAEz6PPRtjHHRK_jFqCnygBN_nY4n0X2a2dUWqvSxhC2fAy+wFw@mail.gmail.com> <20171219191528.2snk3ahnipxcojtb@elstar.local> <644DA50AFA8C314EA9BDDAC83BD38A2E0EAD4D37@sjceml521-mbx.china.huawei.com> <20171219201647.pgywfiws5avnyaul@elstar.local>
Message-ID: <cc1ce5b0-a994-6ab2-cadb-6eda1e4e7235@cisco.com>
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: <https://mailarchive.ietf.org/arch/msg/netmod/GayQFe2dL5CSeju6IRvmLGed3c8>
Subject: Re: [netmod] Augmentation to Groupings
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, 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 YANG.next issue tracker, to 
be considered in a future revision of YANG?

Thanks,
Rob


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 [mailto:netmod-bounces@ietf.org] On Behalf Of Juergen
>>> Schoenwaelder
>>> Sent: Tuesday, December 19, 2017 11:15 AM
>>> To: Xufeng Liu<xufeng.liu.ietf@gmail.com>
>>> Cc: NETMOD WG<netmod@ietf.org>
>>> 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
>>>> netmod@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/netmod
>>> --
>>> 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 mailing list
>>> netmod@ietf.org
>>> https://www.ietf.org/mailman/listinfo/netmod