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

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Wed, 21 December 2016 22:30 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
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 B38B112943D for <netmod@ietfa.amsl.com>; Wed, 21 Dec 2016 14:30:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.3
X-Spam-Level:
X-Spam-Status: No, score=-7.3 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-3.1] autolearn=ham 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 UwWNSACpZ946 for <netmod@ietfa.amsl.com>; Wed, 21 Dec 2016 14:30:43 -0800 (PST)
Received: from atlas3.jacobs-university.de (atlas3.jacobs-university.de [212.201.44.18]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2E1781293FD for <netmod@ietf.org>; Wed, 21 Dec 2016 14:30:43 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas3.jacobs-university.de (Postfix) with ESMTP id 5E09F76C; Wed, 21 Dec 2016 23:30:41 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas3.jacobs-university.de ([10.70.0.205]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10030) with ESMTP id Vjqx1AJNu2TD; Wed, 21 Dec 2016 23:30:38 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas3.jacobs-university.de (Postfix) with ESMTPS; Wed, 21 Dec 2016 23:30:40 +0100 (CET)
Received: from localhost (demetrius4.jacobs-university.de [212.201.44.49]) by hermes.jacobs-university.de (Postfix) with ESMTP id D6CA12007A; Wed, 21 Dec 2016 23:30:40 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius4.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id SxZYPIB7XO_C; Wed, 21 Dec 2016 23:30:39 +0100 (CET)
Received: from elstar.local (elstar.jacobs.jacobs-university.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id 488A620079; Wed, 21 Dec 2016 23:30:39 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501) id 0C34E3DD94D3; Wed, 21 Dec 2016 23:30:39 +0100 (CET)
Date: Wed, 21 Dec 2016 23:30:38 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Andy Bierman <andy@yumaworks.com>
Message-ID: <20161221223038.GB4526@elstar.local>
Mail-Followup-To: Andy Bierman <andy@yumaworks.com>, Martin Bjorklund <mbj@tail-f.com>, "netmod@ietf.org" <netmod@ietf.org>
References: <m2wpety744.fsf@birdie.labs.nic.cz> <20161221.103208.1910010141581780305.mbj@tail-f.com> <CABCOCHQPRbAbeEg=4-oNzXX6nxJhNbow+ebQy+Qv5NOfngeN7w@mail.gmail.com> <20161221.115438.163227970004322277.mbj@tail-f.com> <CABCOCHSW+pCsUjBiKbxq9NKXZo4eAjBvHKtuOS3tNxgqHzuejw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CABCOCHSW+pCsUjBiKbxq9NKXZo4eAjBvHKtuOS3tNxgqHzuejw@mail.gmail.com>
User-Agent: Mutt/1.6.0 (2016-04-01)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/LLNgrO9K7EsdSt3A7gxrq5_Sph0>
Cc: "netmod@ietf.org" <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
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
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 22:30:46 -0000

On Wed, Dec 21, 2016 at 08:21:08AM -0800, Andy Bierman wrote:
> 
> IMO the default should be inherit from parent, like the config-stmt.
> It clutters the YANG module to add a status-stmt to every descendant node.

Yes, explicit status statements clutter the module but they make it
very explicit for the reader that stuff is deprecated or obsolete.  In
SMIv2, we had explicit status clauses everywhere and I have been a big
fan of making current a default so this does not clutter the
module. But I am also a big fan of making a status != current very
explicit so a reader knows for sure which definitions can be ignored.
(Perhaps it is just me but I often search in RFCs and/or YANG modules
and then having to track back the tree to find out whether something I
hit is deprecated or obsolete is a real burden. (In hindsight, I
probably would have preferred to have config true not inherited but
work like the status statement - having to search along the nesting
structure to find out what something means is actually not that reader
friendly - and bits are cheap these days. And the priority order back
in a day was 'readers first, writers second, tool makers last'.)

> The status also applies to augment.  If /foo is deprecated than any
> external augments that adds nodes under /foo is also deprecated.
> (Most obvious when you change deprecated to obsolete).

I may disagree with this, in particular for 'deprecated'. Assuming
there are multiple organizations involved, I think we have a problem
if one organization can deprecate augmentations maintained by another
organization.

Deprecated essentially says 'this will go away, stop using it if you
can'.

> >   container a {
> >     status deprecated;
> >     container b {
> >       status current;
> >     }
> >   }

I think this example is actually not complete non-sense. It says 'this
container will go away, stop using it if you can'. There is still
something current under it and this should be fixed. And this is in
particular true for augmentations, e.g.,

augment /a {
  container c {
  }
}

should be OK - tools may generate warnings to tell the maintainer of
the augmentation to pay attention to the fact that /a may get retired.

Now, the IETF may decide that for published modules, something current
in a deprecated container is to be avoided. But this is then a policy
decision, from the language point of view I consider the case of
something current under a deprecated container not a real error.

/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/>