Re: [netmod] removing a node from a grouping

Robert Wilton <rwilton@cisco.com> Sun, 15 July 2018 11:11 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 F17E9130F65 for <netmod@ietfa.amsl.com>; Sun, 15 Jul 2018 04:11:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.511
X-Spam-Level:
X-Spam-Status: No, score=-14.511 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-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 7iG0LUk2kgb2 for <netmod@ietfa.amsl.com>; Sun, 15 Jul 2018 04:11:23 -0700 (PDT)
Received: from aer-iport-3.cisco.com (aer-iport-3.cisco.com [173.38.203.53]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 44B38130E79 for <netmod@ietf.org>; Sun, 15 Jul 2018 04:11:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2771; q=dns/txt; s=iport; t=1531653083; x=1532862683; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=QQkfa3RARVWUhPPGC24x4yZo53ZscRIo3ua4woQfKU4=; b=m/txWwESotNAp2hLlUOKb6fU7hIVRqE58o421WP904N/Kq2ufcPJllxq ocqvMzK+GrBq5jpaSzmWx+579XDgWPRfq70OxdzAcNwYhwZ/S7GwalH8O rpjrgcta7Qg55F0T6ZlJgd+BGpaErB7Dx3OLMEpdE52JW3J00U3pukRkc 0=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0B0AQDnKktb/xbLJq1cGQEBAQEBAQEBAQEBAQcBAQEBAYQsbRIog3uIY41CJJczCyOESQKCcDgUAQIBAQIBAQJtHAyFNwEFIw8BBTYbCw4KAgImAgJXBgEMBgIBARYBgwUBgX8PqHKBLoRbhWOBC4lOP4E4DIJegxkCgWCDAYJVAoxXjQUJhgqJFwaCBoYWhUmKOYIGhVWBWCGBUjMaCBsVO4JpCYV4im4jMIxjAQE
X-IronPort-AV: E=Sophos;i="5.51,356,1526342400"; d="scan'208";a="5127606"
Received: from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jul 2018 11:11:21 +0000
Received: from [10.61.227.226] ([10.61.227.226]) by aer-core-3.cisco.com (8.15.2/8.15.2) with ESMTP id w6FBBKY0012785; Sun, 15 Jul 2018 11:11:20 GMT
To: Kent Watsen <kwatsen@juniper.net>, "netmod@ietf.org" <netmod@ietf.org>
References: <C16EE3E0-D7B6-486F-8224-F1CC7B224A1D@juniper.net> <80f2c076-1937-9b09-fdec-a4d4c9a16aa5@cisco.com> <B1FEB2BF-5F35-47D0-AE79-517136728071@juniper.net>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <f0a98a7b-bf46-8bd1-0483-d9dbd410cc93@cisco.com>
Date: Sun, 15 Jul 2018 07:11:20 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <B1FEB2BF-5F35-47D0-AE79-517136728071@juniper.net>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/gNEK-Q3WyDcSgaKTNSu2dH5c1rg>
Subject: Re: [netmod] removing a node from a grouping
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.27
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: Sun, 15 Jul 2018 11:11:26 -0000

Hi Kent,

I don't think that this is a valid use of augment - I thought that 
augment can only add news data nodes, not add extra sub statements to 
existing ones.

Also, YANG allows grouping to be changed so that it is constructed from 
sub groupings, at long as the original grouping name is preserved and is 
only updated in a backwards compatible way.  But as you say, this can 
still lead to unnatural groupings.

I still think that groupings are probably being overused.  Perhaps 
Andy's clone statement might be a better alternative in some cases 
(https://github.com/netmod-wg/yang-next/issues/31).

Thanks,
Rob


On 14/07/2018 18:46, Kent Watsen wrote:
> Hi Rob,
>
> Right you are, "refine" doesn't have a "when" substatement, but "augment" does.
>
>      grouping "bar-etc" {
>        uses "foo-bar-etc" {
>          augment "foo" {
>            when "false()";
>          }
>        }
>      }
>
>
> The problem with splitting up groupings is that 1) it needs to be done
> beforehand and 2) it may produce "unnatural" groupings that wouldn't be
> there otherwise.
>
> Kent
>
>
> ===== original message =====
>
> Hi Kent,
>
> I'm not sure that sec 7.13.2 of 7950 allows refine to add a when
> statement, although an equivalent solution would be refine it with an
> if-feature statement for a feature that is never enabled.
>
> Ideally, I think that the groupings would be split up, so that they
> build on each other.
>
>     grouping "foo" {
>       container-or-leaf "foo" { ... }
>     }
>
>     grouping "bar-etc" {
>       container-or-leaf "bar" { ... }
>       ...  // the "etc" ;)
>     }
>
>     grouping "foo-bar-etc" {
>       grouping "foo";
>       grouping "bar-etc";
>     }
>
> Thanks,
> Rob
>
> On 11/07/2018 18:30, Kent Watsen wrote:
>> Say there is:
>>
>>     grouping "foo-bar-etc" {
>>       container-or-leaf "foo" { ... }
>>       container-or-leaf "bar" { ... }
>>       ...  // the "etc" ;)
>>     }
>>
>> And the goal is to use the grouping sans the "foo" node.
>> Can a "when" statement that always evaluates to "false"
>> do it?
>>
>>     grouping "bar-etc" {
>>       uses "foo-bar-etc" {
>>         refine "foo" {
>>           when "false()";
>>         }
>>       }
>>     }
>>
>> Any better ideas?
>>
>> Thanks,
>> Kent
>>
>>
>>
>> _______________________________________________
>> netmod mailing list
>> netmod@ietf.org
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_netmod&d=DwIDaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=n8AUR8gtF330d96dqckvx53hCdyUm5tsTzJsm6DU83U&s=hD50p0RzLVzzTnQ62nxgs256wFf7UmIczTJMf9ym_n8&e=
>> .
>>
>
>