Re: [netmod] augment and if-feature

Andy Bierman <andy@yumaworks.com> Thu, 16 March 2017 16:17 UTC

Return-Path: <andy@yumaworks.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 A5F93129663 for <netmod@ietfa.amsl.com>; Thu, 16 Mar 2017 09:17:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 uQDhjahDFDll for <netmod@ietfa.amsl.com>; Thu, 16 Mar 2017 09:17:36 -0700 (PDT)
Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B83561296A0 for <netmod@ietf.org>; Thu, 16 Mar 2017 09:17:35 -0700 (PDT)
Received: by mail-wm0-x236.google.com with SMTP id n11so116236831wma.1 for <netmod@ietf.org>; Thu, 16 Mar 2017 09:17:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=jJxiZNnfWNQr7whqD8ysMCpFCC99/4raCmFFFSVjNX0=; b=XkntpegqQH/pAjKXe/Bq2gbr9pAMhTTFvvCV1PaBqE6EfY4VivUfvkQIxUoIXeELz6 2cRhNZ6yWYkQbhy2ioPQRudiDfii2UdZemV9XACHMPOdYRUkM5havftpgTG8mEIKhcXe lEzGnQWoT+9cR5aphaaBXzSHIqMI2gtXFrdF3rcTuX3IwNx2u3TyuN4VYSndlC0RKdAV PKl0FGxSOgzv7Gh7fmC36M9PkvElno5r6yllhbW3dEQGiDBQyyf8xkoxUaPALD1KyGJf eoDyeAC5w03qYpxQ6n28orOLrZTDXOFDXhrKj+EaOxuDackYGKFXg764zskUKfqh2t4x LzdA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jJxiZNnfWNQr7whqD8ysMCpFCC99/4raCmFFFSVjNX0=; b=uSu4y1RX4xMCd62e1bsfNiSqNPGXrGaagt61VrloC3KaRTXFeXhNHI492U8DoIDGDs fjCbm8uighTs3VB3RELLmW6g+MXQjdoicfBPmzYSvMZW+4lylVsWj6iA0s3ZAZA44Ljr VzRRILNEu0p3pLoQNj9XN/p3ucl8knOwe/X2RXkbfG4ZJyDIBPwlSznat5YEdeq/hU6T LhN/GzkqU9mAViCZ5fsPmzvv/IAKnO1iMdY6pAPli8yyzjV5YEwWvaHj+zyz1HmbGK/y tk8eAucA33D9Z0nOcokmK8Pjlro/kGGjI3v3HiiGmCi+8PT5tFuZUxRb8ivGlEwj+V1X MnlA==
X-Gm-Message-State: AFeK/H3uaH51ORJLsI6DQDDFzbI8kCDJLouxZI8FdfoN3kbw68ONSGH4LAlnmRoLwjGGgVVh+F1g8tO/dfkXCA==
X-Received: by 10.28.234.206 with SMTP id g75mr9670324wmi.54.1489681054283; Thu, 16 Mar 2017 09:17:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.166.37 with HTTP; Thu, 16 Mar 2017 09:17:33 -0700 (PDT)
In-Reply-To: <ef923b5e-8557-c6d3-8b10-e103cf8d38de@cisco.com>
References: <877f3q2wje.fsf@hobgoblin.ariadne.com> <ef923b5e-8557-c6d3-8b10-e103cf8d38de@cisco.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 16 Mar 2017 09:17:33 -0700
Message-ID: <CABCOCHQkps=1Do1bXPF-hRk=YpG-d8p+xoDBE4=_evgoZQ7u-w@mail.gmail.com>
To: Robert Wilton <rwilton@cisco.com>
Cc: "Dale R. Worley" <worley@ariadne.com>, JOEY BOYD <joey.boyd@adtran.com>, "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="001a11472b9e11f2a1054adb66cd"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Yu-9pQGWHapCTv91qsP6x1vlmxk>
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 16:17:38 -0000

On Thu, Mar 16, 2017 at 2:54 AM, Robert Wilton <rwilton@cisco.com> wrote:

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


> Rob
>
>
Andy


>
>
>> Dale
>>
>> _______________________________________________
>> netmod mailing list
>> netmod@ietf.org
>> https://www.ietf.org/mailman/listinfo/netmod
>> .
>>
>>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>