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

Andy Bierman <andy@yumaworks.com> Tue, 20 December 2016 20:28 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 906A5129601 for <netmod@ietfa.amsl.com>; Tue, 20 Dec 2016 12:28:48 -0800 (PST)
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 gqxCYaYEBaqk for <netmod@ietfa.amsl.com>; Tue, 20 Dec 2016 12:28:46 -0800 (PST)
Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::232]) (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 89C751295F0 for <netmod@ietf.org>; Tue, 20 Dec 2016 12:28:46 -0800 (PST)
Received: by mail-qk0-x232.google.com with SMTP id q68so61092393qki.1 for <netmod@ietf.org>; Tue, 20 Dec 2016 12:28:46 -0800 (PST)
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; bh=m+P5Xb5OpcSOEdqhZfpRqX71bx3WV+H9gV3gBbeDKwI=; b=X3RETJozyYjpphrkQXZ/DngBpkSNwWE7sgHzTaiNMWZBRz2YQlVTYzfFSrhPeGmzI9 ptY2uFWvzkkTkE9eFRn1JbXMnPlkh6eTfDS1QrNaN440cPwt9gOrnBBicN91peVoxwKD T9Y0/yeiLE21e0CwLBKCz4o98MvCW1JZE7mM3UYwqe5KryBqrPJkkc4HjBKKINoH7mnh Gj3knJTMCgZqUim+uJgerc2OZiFNtAH8Zbc+ucw1SCl9IE8A6Fyhpq0dih4V7lwJxjrk EcT7WGPiZISLr9yZrEtMB8snuK0D/YjWErFiW/AnrNAhlqoMt21+z4Dd0oY5F1ytvrlV IiJQ==
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; bh=m+P5Xb5OpcSOEdqhZfpRqX71bx3WV+H9gV3gBbeDKwI=; b=nggTcHn57NIgx/DvMHvcvmDtaesvLFIPtsC6OaLVVKhu4djbI7tijOI7SAwON8dx9L +j5u5dtHVvC7mN1Lqkv55Eu3kvQtYqw+iZU5MEmwqJK109gbJlBifDFLU7m382OsEs2L mZw0M6HFnOhMXqvNvR85ZAsTVoanNPUt4rw+7mzoQfSZf0X1+ZXQFnBAh+1f3N7ZrHXF Cf1SZQfxedhA4KE7DMDgqH+t45YvuV7w0V+cfpusJuEBLnjHle6OilsJsChaVj7OtSCL OySPhlNI6ONjPXdq0sqyuyIpFGBFGML8PHrgavV70HYpwyqMUUVU1uTCUmpdh/XlHHOT P29g==
X-Gm-Message-State: AIkVDXKQ5SOYDVkil8CGNah95noYcTpEQcDHEqXIZ7NamiawGfEcCbgUHoxyOkHKNbbWF4lxA44YGO2+6c4msA==
X-Received: by 10.55.69.68 with SMTP id s65mr1348217qka.314.1482265725535; Tue, 20 Dec 2016 12:28:45 -0800 (PST)
MIME-Version: 1.0
Received: by 10.12.175.113 with HTTP; Tue, 20 Dec 2016 12:28:45 -0800 (PST)
In-Reply-To: <20161220201527.GA3897@elstar.local>
References: <1db67b1d-36ef-5cc6-425f-7e22de7e80ae@cisco.com> <20161220.210335.1870203216124697421.mbj@tail-f.com> <20161220201527.GA3897@elstar.local>
From: Andy Bierman <andy@yumaworks.com>
Date: Tue, 20 Dec 2016 12:28:45 -0800
Message-ID: <CABCOCHR3C_g03NOEDHbbF=ouG6Ubk3cF9rX6tNDvARE1PC6o2w@mail.gmail.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Martin Bjorklund <mbj@tail-f.com>, Robert Wilton <rwilton@cisco.com>, "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="001a1148aaf2089b0d05441ce2be"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/aQmmZT-enyL0McF-2eISScSxeIw>
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: Tue, 20 Dec 2016 20:28:48 -0000

Hi,

I just checked the following YANG:

    container foo {
      status deprecated;
      leaf L1 {
         status current;
         type string;
      }
    }


pyang does not complain about it at all.
yangdump-pro issues a warning

Warning: Invalid status: child node 'L1' = 'current' and parent node 'foo'
= 'deprecated'
t1003.yang:9.7: warning(1024): invalid status for child node


IMO the status is inherited from its parent.
The entire subtree is deprecated or obsolete.
What does it even mean (from operations POV) to have an child nodes
that are current but the ancestors are not?


Andy



On Tue, Dec 20, 2016 at 12:15 PM, Juergen Schoenwaelder <
j.schoenwaelder@jacobs-university.de> 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
>
> --
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>