Re: [netmod] augment and if-feature

worley@ariadne.com (Dale R. Worley) Wed, 15 March 2017 19:02 UTC

Return-Path: <worley@alum.mit.edu>
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 993421317C4 for <netmod@ietfa.amsl.com>; Wed, 15 Mar 2017 12:02:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.933
X-Spam-Level:
X-Spam-Status: No, score=-1.933 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 h8ysMf0M2aUF for <netmod@ietfa.amsl.com>; Wed, 15 Mar 2017 12:02:32 -0700 (PDT)
Received: from resqmta-ch2-03v.sys.comcast.net (resqmta-ch2-03v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B1DA31317C1 for <netmod@ietf.org>; Wed, 15 Mar 2017 12:02:32 -0700 (PDT)
Received: from resomta-ch2-17v.sys.comcast.net ([69.252.207.113]) by resqmta-ch2-03v.sys.comcast.net with SMTP id oEA3cV9uKdEjjoEBrciffL; Wed, 15 Mar 2017 19:02:31 +0000
Received: from hobgoblin.ariadne.com ([IPv6:2601:192:4603:9471:222:fbff:fe91:d396]) by resomta-ch2-17v.sys.comcast.net with SMTP id oEBqc0051UA1toEBrcwtOm; Wed, 15 Mar 2017 19:02:31 +0000
Received: from hobgoblin.ariadne.com (hobgoblin.ariadne.com [127.0.0.1]) by hobgoblin.ariadne.com (8.14.7/8.14.7) with ESMTP id v2FJ2Ujx019671; Wed, 15 Mar 2017 15:02:30 -0400
Received: (from worley@localhost) by hobgoblin.ariadne.com (8.14.7/8.14.7/Submit) id v2FJ2TN3019668; Wed, 15 Mar 2017 15:02:30 -0400
X-Authentication-Warning: hobgoblin.ariadne.com: worley set sender to worley@alum.mit.edu using -f
From: worley@ariadne.com
To: JOEY BOYD <joey.boyd@adtran.com>
Cc: netmod@ietf.org
In-Reply-To: <26CE489EF4611643B3EFE43D06E02654015E6596C7@ex-mb1.corp.adtran.com> (joey.boyd@adtran.com)
Sender: worley@ariadne.com
Date: Wed, 15 Mar 2017 15:02:29 -0400
Message-ID: <877f3q2wje.fsf@hobgoblin.ariadne.com>
X-CMAE-Envelope: MS4wfJAPLcIq3MGvA58KKuF6Xg7pPoFG2HZ2chEfE+26I2adWDSV/1LO+xQUU2c9vyRWjzuV56+nEOIaYpIPlRsruC18Yl89S2bfSE8JEnQzdiJrDqnjQ7c3 0xCx6yNGGkfwVdBRN2NPYE03c7NaLkDBPgRwwHp6XtDMi1GT9sT38vMHeKWVolJgNdQ3O7V+pncc3A==
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/QddDBkezV4Zv_gJRl6J2IdAx3WA>
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: Wed, 15 Mar 2017 19:02:34 -0000

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"'.

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.

Dale