Re: [netmod] augment and if-feature
Robert Wilton <rwilton@cisco.com> Thu, 16 March 2017 17:18 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 E4D981296CD for <netmod@ietfa.amsl.com>; Thu, 16 Mar 2017 10:18:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.522
X-Spam-Level:
X-Spam-Status: No, score=-14.522 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, 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 IiqRYp7Iv4Dx for <netmod@ietfa.amsl.com>; Thu, 16 Mar 2017 10:18:06 -0700 (PDT)
Received: from aer-iport-4.cisco.com (aer-iport-4.cisco.com [173.38.203.54]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DECF81296C0 for <netmod@ietf.org>; Thu, 16 Mar 2017 10:18:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=13336; q=dns/txt; s=iport; t=1489684686; x=1490894286; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to; bh=nrdikzzmRSlNuJudbCAfDDUhz6J8zmYPWNyJV7kr5k8=; b=hSJSEpO2oCPGlUCjTuGYlIcETYBG/f5PbUJC6Kh2rqAeGVNH/uAPNCIP 5G1LhtQyKcKcwMxta0VMhJOZwkMp6kUYP4H3N7Kv8LrCn/kmsySXAp4U/ 0wn5zFmQzR1a3nHHfZOK/GYQQYy6m4lfZs9xw04XraLujRuqZfszuMIVt Q=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CbAQB7x8pY/xbLJq1eGQEBAQEBAQEBAQEBBwEBAQEBhDIqYINhig9zkGWQEYUugg4fAQqFLkoCg0UYAQIBAQEBAQEBayiFFQEBAQECAQEBIUgDCwULCxgnAwICJx8RBg0GAgEBiXQIDrEngiYriiYBAQEBAQEBAQEBAQEBAQEBAQEBAQEYBYZOggWCaoQcgz6CXwWcRZI+gXuFKIMzhlOIS4JziA8fOIEEIxYIFxVBhB45HYFjQDWHGoIuAQEB
X-IronPort-AV: E=Sophos;i="5.36,173,1486425600"; d="scan'208,217";a="653321666"
Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2017 17:18:01 +0000
Received: from [10.63.23.115] (dhcp-ensft1-uk-vla370-10-63-23-115.cisco.com [10.63.23.115]) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id v2GHI1Zc005656; Thu, 16 Mar 2017 17:18:01 GMT
To: Andy Bierman <andy@yumaworks.com>
References: <877f3q2wje.fsf@hobgoblin.ariadne.com> <ef923b5e-8557-c6d3-8b10-e103cf8d38de@cisco.com> <CABCOCHQkps=1Do1bXPF-hRk=YpG-d8p+xoDBE4=_evgoZQ7u-w@mail.gmail.com>
Cc: "Dale R. Worley" <worley@ariadne.com>, JOEY BOYD <joey.boyd@adtran.com>, "netmod@ietf.org" <netmod@ietf.org>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <67e7ba2b-c526-fd9b-f39f-14f5b0490f4f@cisco.com>
Date: Thu, 16 Mar 2017 17:18:01 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1
MIME-Version: 1.0
In-Reply-To: <CABCOCHQkps=1Do1bXPF-hRk=YpG-d8p+xoDBE4=_evgoZQ7u-w@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------3C9747A27FE9B20AC5E64FC8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/ybvMyAKHabtTwbOhW9PcKy_Asfw>
Subject: Re: [netmod] augment and if-feature
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: Thu, 16 Mar 2017 17:18:10 -0000
Hi Andy, On 16/03/2017 16:17, Andy Bierman wrote: > > > On Thu, Mar 16, 2017 at 2:54 AM, Robert Wilton <rwilton@cisco.com > <mailto:rwilton@cisco.com>> wrote: > > Hi Dale, > > > On 15/03/2017 19:02, Dale R. Worley wrote: > > JOEY BOYD <joey.boyd@adtran.com <mailto:joey.boyd@adtran.com>> > writes: > > module base-module { > prefix bmod; > > feature do-things; > > container things { > if-feature do-things; > ... > } > } > > module augment-module { > prefix amod; > > augment "/bmod:do-things" { > container other-things { > } > } > } > > First question: I'm not expert in Yang, but as far as I can > figure out, > the augment statement is augmenting "container things", > right? So the > augment statement should be 'augment "/bmod:things"' not 'augment > "/bmod:do-things"'. > > Yes, the augment should be to "things". > > > But on the important question, I don't see it as at all > unreasonable > that the augment needs to be qualified by the same > if-feature. The > reason is that if you're reading the text of module > augment-module, it's > helpful to have documented, right there, that the augmentation > depends > on the presence of a particular feature in the augmented > module. And > it's helpful to know that the designer did, at least for one > moment, > think about the fact that the augmentation is conditional. > > > It isn't just any if-feature on the container that is being > augmented that needs to be considered. You would have to consider > all if-feature statements by walking up the augmented node's > ancestors to the top of the tree and combine them, or have > multiple if-feature statements. > > Further, the 7950 YANG update rules allow for the augmented module > to be revised and some of those if-feature statements to be > subsequently removed. If the augmenting module had restated the > if-feature conditions then this would probably leave the > augmenting module unintentionally out of sync with the module that > it is augmenting. > > In short, I think that if-feature statements work better if they > act on the given node and all descendant nodes, regardless of > which module those descendants are defined in. > > > "work better" > > Please explain which protocol you are using that allows you to manage > descendant nodes of unimplemented nodes. > > NETCONF and RESTCONF do not work at all wrt/ accessing such nodes. I think that we may be crossing wires: It was NETCONF/RESTCONF that I was thinking of, and I am not considering managing descendant nodes of unimplemented nodes. I think that the question is only whether an augmentation of a node that has an if-feature statement also requires the same if-feature statement on the augment statement. To quote Joey's example, I think that both of the following modules are valid (presuming that they are both implemented by a device) regardless of which features are enabled. Do you agree? module base-module { prefix bmod; feature things; feature widgets; container things { if-feature things; ... container widgets { if-feature widgets; ... } } } module augment-module { prefix amod; augment "/bmod:things" { container other-things { } } augment "/bmod:things/bmod:widgets" { container other-widgets { } } } Thanks, Rob > Rob > > > Andy > > > > Dale > > _______________________________________________ > netmod mailing list > netmod@ietf.org <mailto:netmod@ietf.org> > https://www.ietf.org/mailman/listinfo/netmod > <https://www.ietf.org/mailman/listinfo/netmod> > . > > > _______________________________________________ > netmod mailing list > netmod@ietf.org <mailto:netmod@ietf.org> > https://www.ietf.org/mailman/listinfo/netmod > <https://www.ietf.org/mailman/listinfo/netmod> > >
- [netmod] augment and if-feature JOEY BOYD
- Re: [netmod] augment and if-feature Martin Bjorklund
- Re: [netmod] augment and if-feature JOEY BOYD
- Re: [netmod] augment and if-feature JOEY BOYD
- Re: [netmod] augment and if-feature Phil Shafer
- Re: [netmod] augment and if-feature Martin Bjorklund
- Re: [netmod] augment and if-feature Phil Shafer
- Re: [netmod] augment and if-feature Martin Bjorklund
- Re: [netmod] augment and if-feature Robert Wilton
- Re: [netmod] augment and if-feature Martin Bjorklund
- Re: [netmod] augment and if-feature Robert Wilton
- Re: [netmod] augment and if-feature Martin Bjorklund
- Re: [netmod] augment and if-feature Phil Shafer
- Re: [netmod] augment and if-feature Phil Shafer
- Re: [netmod] augment and if-feature Andy Bierman
- Re: [netmod] augment and if-feature Dale R. Worley
- Re: [netmod] augment and if-feature Robert Wilton
- Re: [netmod] augment and if-feature Juergen Schoenwaelder
- Re: [netmod] augment and if-feature Dale R. Worley
- Re: [netmod] augment and if-feature Andy Bierman
- Re: [netmod] augment and if-feature Andy Bierman
- Re: [netmod] augment and if-feature Robert Wilton
- Re: [netmod] augment and if-feature Andy Bierman
- Re: [netmod] augment and if-feature Robert Wilton
- Re: [netmod] augment and if-feature Dale R. Worley
- Re: [netmod] augment and if-feature Robert Wilton