Re: [netmod] augment and if-feature
Robert Wilton <rwilton@cisco.com> Thu, 16 March 2017 17:34 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 E65981296CB for <netmod@ietfa.amsl.com>; Thu, 16 Mar 2017 10:34:56 -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 DD6ZcIcu6dNq for <netmod@ietfa.amsl.com>; Thu, 16 Mar 2017 10:34:54 -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 D67831296C4 for <netmod@ietf.org>; Thu, 16 Mar 2017 10:34:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=20339; q=dns/txt; s=iport; t=1489685693; x=1490895293; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to; bh=N/FCbpDx02XvCPaONbOac0ovjqjTo9jY6WWaVhG03vA=; b=L5SDumkamNdXK4ky8abwI9ep90T94Zn+Ry/uPwgqPh++gVthOlOrTlCB oGaYKql44Z6EW3Has1rMEJvensb7+/XqI9/bmQSYg9ElXbpiP65mEnM6F i3/hUHfUi5X3Pjy6YgR/mFKY9FwAELSmNhFMla6wdv1idyw6ctUEk2X94 I=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AiBABnzMpY/xbLJq1eGQEBAQEBAQEBAQEBBwEBAQEBhDIqYINhiwKQZZU/gg4fAQqFLkoCg0YXAQIBAQEBAQEBayiFFQEBAQECAQEBIUgDCwULCxgnAwICJx8RBg0GAgEBiXQIDrE0giYriiQBAQEBAQEBAQEBAQEBAQEBAQEBAQEYBYZOggWCaoQcIoMcgl8FlgCGRZI+gXuFKIMzhlOIS4JziA8gATaBBCMWCBcVQYQeOR2BY0A1hxqCLgEBAQ
X-IronPort-AV: E=Sophos;i="5.36,173,1486425600"; d="scan'208,217";a="653321956"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2017 17:34:49 +0000
Received: from [10.63.23.115] (dhcp-ensft1-uk-vla370-10-63-23-115.cisco.com [10.63.23.115]) by aer-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id v2GHYlFN013087; Thu, 16 Mar 2017 17:34:48 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> <67e7ba2b-c526-fd9b-f39f-14f5b0490f4f@cisco.com> <CABCOCHQ=Yrde0COtFbCiYj4w3e0d7DY56tqrhaBmVWZvsK3ywg@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: <6e3ac8db-8c6e-1d31-277a-8d5536ff7afe@cisco.com>
Date: Thu, 16 Mar 2017 17:34:47 +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: <CABCOCHQ=Yrde0COtFbCiYj4w3e0d7DY56tqrhaBmVWZvsK3ywg@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------3D30BD99DEB39E2E1BEAB479"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/tjNOiKRF5DovT4IPqSaGDZzLRy4>
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:34:57 -0000
On 16/03/2017 17:26, Andy Bierman wrote: > > > On Thu, Mar 16, 2017 at 10:18 AM, Robert Wilton <rwilton@cisco.com > <mailto:rwilton@cisco.com>> wrote: > > 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. > > > no -- I don't think there is any requirement. > As pointed out, the if-features can be anywhere in the ancestor nodes. > If any of them are false for a given server, then the augmenting nodes > are inaccessible. Agreed. > > > 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? > > > > The modules are valid. > The conformance decision (i.e., which features are advertised and > which are not by a server implementation) > does not change the compile-time validity of the YANG modules Also agreed. Thanks, Rob > 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 > > > > > Andy > >> 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