Re: [netmod] augment and if-feature
Robert Wilton <rwilton@cisco.com> Thu, 16 March 2017 09:54 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 7695B12704B for <netmod@ietfa.amsl.com>; Thu, 16 Mar 2017 02:54:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.523
X-Spam-Level:
X-Spam-Status: No, score=-14.523 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, 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 7kiuEYQwfaXK for <netmod@ietfa.amsl.com>; Thu, 16 Mar 2017 02:54:19 -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 6D27A126D74 for <netmod@ietf.org>; Thu, 16 Mar 2017 02:54:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2193; q=dns/txt; s=iport; t=1489658058; x=1490867658; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=WFFWg8nAtsAvS0ZZIyQ3q8QZr6RSQrZh9EvKTBc/bTs=; b=OeOqJwP79LZyvAvGEB5TNxqrOKQhRyVThuZCi8GdW7+pqdzYRlOpYG9p KVy3gw783Uy3UVUBf2jjT/ertsJrOq4A4oEcDTmopEK2pqUP/ZFXy2HgV Zf4CDzmASDb0OKVPx0lEPLRjubnS+g6IrURzARXirDBtT7Jd+Mr9w0r7A k=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BRAQAYYMpY/xbLJq1dGQEBAQEBAQEBAQEBBwEBAQEBhDIqYI1wc5BGH5U/gg4fC4UuSgKDVRgBAgEBAQEBAQFrKIUVAQEBAQIBAQE2MwMLEAsYLicwBgEMBgIBAYl0CA6yQIpSAQEBAQEBAQEBAQEBAQEBAQEBAQEBGAWGToIFCIJiijkFnEWSPoF7iFuGU4hLgnOIDx84gQQjFggXFUGEVx2BY0A1iUgBAQE
X-IronPort-AV: E=Sophos;i="5.36,170,1486425600"; d="scan'208";a="651487186"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2017 09:54:16 +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 v2G9sFkb028528; Thu, 16 Mar 2017 09:54:16 GMT
To: "Dale R. Worley" <worley@ariadne.com>, JOEY BOYD <joey.boyd@adtran.com>
References: <877f3q2wje.fsf@hobgoblin.ariadne.com>
Cc: netmod@ietf.org
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <ef923b5e-8557-c6d3-8b10-e103cf8d38de@cisco.com>
Date: Thu, 16 Mar 2017 09:54:14 +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: <877f3q2wje.fsf@hobgoblin.ariadne.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/oSQBAEP392nMJJ-a6Dft7Q3Lqyc>
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 09:54:21 -0000
Hi Dale, On 15/03/2017 19:02, Dale R. Worley wrote: > JOEY BOYD <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. Rob > > Dale > > _______________________________________________ > netmod mailing list > netmod@ietf.org > 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