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

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Thu, 22 December 2016 00:13 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 3F88E129573 for <netmod@ietfa.amsl.com>; Wed, 21 Dec 2016 16:13:50 -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 woIzheBM_n-9 for <netmod@ietfa.amsl.com>; Wed, 21 Dec 2016 16:13:49 -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 D3C98129498 for <netmod@ietf.org>; Wed, 21 Dec 2016 16:13:48 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas3.jacobs-university.de (Postfix) with ESMTP id A893D6B3; Thu, 22 Dec 2016 01:13:47 +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 M8XKoI9qu9v6; Thu, 22 Dec 2016 01:13:44 +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; Thu, 22 Dec 2016 01:13:47 +0100 (CET)
Received: from localhost (demetrius2.jacobs-university.de [212.201.44.47]) by hermes.jacobs-university.de (Postfix) with ESMTP id 1A3232007A; Thu, 22 Dec 2016 01:13:47 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius2.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id D1obtRM-4fDD; Thu, 22 Dec 2016 01:13:46 +0100 (CET)
Received: from elstar.local (elstar.jacobs.jacobs-university.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id 7365420079; Thu, 22 Dec 2016 01:13:46 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501) id 3A5CC3DD9755; Thu, 22 Dec 2016 01:13:46 +0100 (CET)
Date: Thu, 22 Dec 2016 01:13:46 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Andy Bierman <andy@yumaworks.com>
Message-ID: <20161222001346.GA4679@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> <20161221223038.GB4526@elstar.local> <CABCOCHTvvvsb0pVF94Fs5m7TdARu9D+M0eQaTo-mQgTHjwsi+w@mail.gmail.com> <20161221234135.GA4630@elstar.local> <CABCOCHRPiS9Og72nRtkwc__W_puH1euqU59qd-VrAUzWsiVeBA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CABCOCHRPiS9Og72nRtkwc__W_puH1euqU59qd-VrAUzWsiVeBA@mail.gmail.com>
User-Agent: Mutt/1.6.0 (2016-04-01)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/SG4lEvOyhM681gRRSo4i253ZzI8>
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: Thu, 22 Dec 2016 00:13:50 -0000

On Wed, Dec 21, 2016 at 03:55:16PM -0800, Andy Bierman wrote:
> On Wed, Dec 21, 2016 at 3:41 PM, Juergen Schoenwaelder <
> j.schoenwaelder@jacobs-university.de> wrote:
> 
> > On Wed, Dec 21, 2016 at 02:47:49PM -0800, Andy Bierman wrote:
> > > Hi,
> > >
> > > YANG data is hierarchical.
> > > It makes no sense at all the consider the descendant nodes current
> > > when the parent is deprecated or obsolete.  If the parent goes away
> > > then it is impossible to access any descendant nodes, so the
> > > default status of 'current' is meaningless in this case.
> > >
> > > If you augment somebody else's subtree and they decide to deprecate
> > > or obsolete it, your data is also deprecated or obsolete.
> > > That's how hierarchcal data works.
> > >
> >
> > We disagree, in particular when it comes to deprecated. And as I
> > mentioned in a previous email, the bigger picture is not just about
> > containers and nesting hierarchies. We can deprecate typedefs,
> > groupings, we may deprecate a leaf that is referred to by other
> > leafrefs etc. With your idea that deprecating something means that
> > everything that directly or indirectly refers to this something gets
> > automatically deprecated as well, we may turn 'deprecated' into a
> > pointless tool.
> >
> > In general, it is impossible to determine what all directly or
> > indirectly refers to a certain definition unless you have access to
> > all YANG modules in the world. So how can you ever take a decision to
> > deprecate something if there is no reliable way to assess the impact?
> > Hence, the deprecate status becomes effectively pointless. I rather
> > have an interpretation of deprecated that actually serves a purpose,
> > namely making maintainers of current definitions aware that their
> > current definitions depend on something now deprecated.
> >
> > Perhaps I am blinded by the way @deprecate or __attribute__
> > ((deprecated)) or [[deprecated]] work in various programming
> > languages. All these annotations do not deprecate my code, they just
> > cause the generation of warnings so that I get aware of the issue and
> > can do my homework.
> >
> >
> There are no protocols that let you manage orphaned data nodes
> without any parent.  No way to represent it in XML or JSON either.
> No way to specify a RESTCONF target resource that leaves out
> some intermediate data nodes.
> 
> It seems obvious that the deprecated warning (this node may go away)
> also applies to all descendant nodes.  Once the node is changed from
> deprecated to obsolete, all the descendant nodes are gone as well,
> so ignoring the warning because YANG says the default is current seems
> unwise.

I have been writing about 'deprecated'. I can't say it more clearly.

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