Re: [netmod] Does the YANG "status" statement inherit from its parent node?

Robert Wilton <rwilton@cisco.com> Wed, 21 December 2016 13:47 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 D4873129561 for <netmod@ietfa.amsl.com>; Wed, 21 Dec 2016 05:47:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.622
X-Spam-Level:
X-Spam-Status: No, score=-17.622 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=-3.1, 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 IabtQ1FHycIg for <netmod@ietfa.amsl.com>; Wed, 21 Dec 2016 05:47:07 -0800 (PST)
Received: from aer-iport-2.cisco.com (aer-iport-2.cisco.com [173.38.203.52]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 00AA21295BB for <netmod@ietf.org>; Wed, 21 Dec 2016 05:47:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1809; q=dns/txt; s=iport; t=1482328026; x=1483537626; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=NARkPoAzI5OW6oo36Xu/9VijC36kk6qv3AvS3z5HZ2w=; b=MICrAZWf2a5VkDAUV1Rru4pO9eu/wcut39NEGux4/5Et4OSvZrPpl6iL y+gozN19FgYGz19IYqCepqhs+QTrXJVj1kWpXn2Wj+uTtUE67xpI14ehM yKESoEvYcqsiO6wXZlOlD4twXorPeOFkgNoimdcyriV4hiQx8tLBzAAZH E=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CSAgAxh1pY/xbLJq1dGQEBAQEBAQEBAQEBBwEBAQEBgzUBAQEBAZBDlWCTBIIPggqGIgKCHBIBAgEBAQEBAQFiKIRpAQU4UQsOCi5XBgEMCAEBiGeqf4sRAQEBAQEBAQEBAQEBAQEBAQEBIIY2gX2CXIohAQSGPJQ7iWSDFYRAiiKGL4o/g2WEDyYGKoEHFg2EExyBXT6GUSuCEAEBAQ
X-IronPort-AV: E=Sophos;i="5.33,383,1477958400"; d="scan'208";a="648064802"
Received: from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Dec 2016 13:47:01 +0000
Received: from [10.63.23.74] (dhcp-ensft1-uk-vla370-10-63-23-74.cisco.com [10.63.23.74]) by aer-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id uBLDl1LO003399; Wed, 21 Dec 2016 13:47:01 GMT
To: Martin Bjorklund <mbj@tail-f.com>, netmod@ietf.org
References: <1db67b1d-36ef-5cc6-425f-7e22de7e80ae@cisco.com> <20161220.210335.1870203216124697421.mbj@tail-f.com> <20161220201527.GA3897@elstar.local>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <b91217fd-c44d-726b-657d-a6127409c109@cisco.com>
Date: Wed, 21 Dec 2016 13:47:01 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <20161220201527.GA3897@elstar.local>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/MZrT6Fxp1IZ63dVuVjKG_WNsVbQ>
Subject: Re: [netmod] Does the YANG "status" statement inherit from its parent node?
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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, 21 Dec 2016 13:47:09 -0000

I think that it should be a error to have a current node under a 
deprecated node in the same module, and similarly for 
deprecated/obsolete.  I.e. to be consistent with the following text from 
7950 sec 7.21.2:

'If a definition is "current", it MUST NOT reference a "deprecated" 
or"obsolete" definition within the same module.'

I agree that it is useful if tools generate warnings if a module 
augments (or references) a deprecated or obsolete node (as per Juergen's 
comments below).

I don't have an issue with explicitly marking the child nodes as 
deprecated/obsolete, but intuitively I would have expected this to 
inherit like the config statement.

Rob


On 20/12/2016 20:15, Juergen Schoenwaelder wrote:
> On Tue, Dec 20, 2016 at 09:03:35PM +0100, Martin Bjorklund wrote:
>> However, we could have said that a current node under a deprecated
>> node (etc) in the same module is an error, in order to force people
>> (through the useage of YANG validators) to detect and fix this.
>>
> Is it an error or just something that deserves a warning and the
> author's attention? I am asking since we also have augmentations and
> if I mark a container as deprecated, this will not immediately cause
> an module augmenting the containter to get updated, hence I end up
> with definitions marked current in a deprecated container. And there
> are other situations where definitions may not be of the same status,
> i.e., a module (without import by revision) uses a type or grouping
> that in later revisions got marked deprecated. I think all of these
> status mismatches are things tools should warn about but I am not sure
> these are hard errors, in particular for 'deprecated'. Things may lead
> to stronger warnings for definitions marked 'obsolete'.
>
> /js
>