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

Ladislav Lhotka <lhotka@nic.cz> Wed, 21 December 2016 13:57 UTC

Return-Path: <lhotka@nic.cz>
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 B4B19129668 for <netmod@ietfa.amsl.com>; Wed, 21 Dec 2016 05:57:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.1
X-Spam-Level:
X-Spam-Status: No, score=-10.1 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, RP_MATCHES_RCVD=-3.1] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 UaJbZGnKOni2 for <netmod@ietfa.amsl.com>; Wed, 21 Dec 2016 05:57:32 -0800 (PST)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 560D7129561 for <netmod@ietf.org>; Wed, 21 Dec 2016 05:57:29 -0800 (PST)
Received: from [IPv6:2001:718:1a02:1:a433:9391:e4ad:aa3f] (unknown [IPv6:2001:718:1a02:1:a433:9391:e4ad:aa3f]) by mail.nic.cz (Postfix) with ESMTPSA id B38EC60AD4; Wed, 21 Dec 2016 14:57:27 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1482328647; bh=gX5Ah8t86yEbVQzqZPKNHiUtFYu8oLNSitij/fEUaZw=; h=From:Date:To; b=fIcGt7fimqIz8cvFZ7DxZ1u141KQy4kMdqvEsN3ngq5qj6nsZ14mepW000nkBd7zC niWra9B49nSagpuqlUt2KPvVT8zl3raQMamqSBK9JwKef/ms6B5v67TsfOg7+pP9qW LOFWX4avCE9NtICdtzytO9ulntcig/0Xya4KY7/A=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <b91217fd-c44d-726b-657d-a6127409c109@cisco.com>
Date: Wed, 21 Dec 2016 14:57:27 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <6BBBB0DE-8322-4DCF-BEF6-1B4A97BA1712@nic.cz>
References: <1db67b1d-36ef-5cc6-425f-7e22de7e80ae@cisco.com> <20161220.210335.1870203216124697421.mbj@tail-f.com> <20161220201527.GA3897@elstar.local> <b91217fd-c44d-726b-657d-a6127409c109@cisco.com>
To: Robert Wilton <rwilton@cisco.com>
X-Mailer: Apple Mail (2.3259)
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/81ZumfePf0gHx-4xUf00oqoD2Kc>
Cc: netmod@ietf.org
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:57:35 -0000

> On 21 Dec 2016, at 14:47, Robert Wilton <rwilton@cisco.com> wrote:
> 
> 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.

+1

If everybody agrees that "current" under "deprecated"/"obsolete" is an error, then "current" shouldn't be the default in such situations.

Lada

> 
> 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
>> 
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67