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

Andy Bierman <andy@yumaworks.com> Thu, 22 December 2016 00:15 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 3DF54129498 for <netmod@ietfa.amsl.com>; Wed, 21 Dec 2016 16:15:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, 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 19_BfU99o5D0 for <netmod@ietfa.amsl.com>; Wed, 21 Dec 2016 16:15:53 -0800 (PST)
Received: from mail-qt0-x229.google.com (mail-qt0-x229.google.com [IPv6:2607:f8b0:400d:c0d::229]) (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 5BABA129477 for <netmod@ietf.org>; Wed, 21 Dec 2016 16:15:53 -0800 (PST)
Received: by mail-qt0-x229.google.com with SMTP id p16so218692972qta.0 for <netmod@ietf.org>; Wed, 21 Dec 2016 16:15:53 -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=zW8m9B4np/UxStjpk3LAEg8/TG8tFQXfPkA5mRjHWVs=; b=cJhk3e5Y0qsV8G02yHoYropGbsSAYOeQ+0DmxzPrEQwxXGyZMuIu9Elu7p+/0IUGzx x8oXPM6Dc/4X8XAvc9NmEISn1/IO6A+7+OQa3CpOq6ZqrgFVs1/KxVFdAmGwf9Gt8cxt YLcjxBYqcbnnVlt9LZmZ5fjtFkNMci5RmwDMjEjW2PJW1MJxP2GvuR0x9wvCTDyEuj3g P3uS5SnGkcAZKfjCx0SvFm6bXPGncSyRzL0K8FySjRg56tSRptA7RDtkOHq8mAZfhZQw /ZijaOYicVW8zG4miFGI4QX3E41xLQDPey5EdzeLMIKjTIDcEqFd7L6FXcgDWWGV6oQ6 1mQA==
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=zW8m9B4np/UxStjpk3LAEg8/TG8tFQXfPkA5mRjHWVs=; b=QYMftOdrQ0mEXKqtBMQpek4cd7AlqV9ntQnrW7lhBVwR/AhzmOXn4SFvVGfiWWEaU4 3VR61mn1FD1TDsD/MryMu0ItmVmbrIHBVXgq2YSin2dPkEnAONoc1j/R5Q6rhLGGtYXq gyQWfXrh8As6GzP24qZmQplw2DfZB/f2aI2NAOHKSwW8zsmoC9Ndc0i29c5XS6mPvPuE FrGaZvUxdqyZZfwzxBE+dboH3JV3sd2pbmHbxSPR/BPpIOQ61mspU26t5HnuZrezN+j9 AH+5SAgDOd3vWo1P5+V1UCH1+RCjydPTLh2OJunRpbA6FeBgxx+n+hxoAO0v8mA7JCCI /XpQ==
X-Gm-Message-State: AIkVDXKFQ/U5c1VIhaBc9AywK1EN4oR7GoHHKV3ZHM9B911oT6b2ovPsr8KeVeMgjjJqHwK2WcXKTpf2ctMllQ==
X-Received: by 10.237.51.167 with SMTP id v36mr8005495qtd.46.1482365752524; Wed, 21 Dec 2016 16:15:52 -0800 (PST)
MIME-Version: 1.0
Received: by 10.12.175.113 with HTTP; Wed, 21 Dec 2016 16:15:51 -0800 (PST)
In-Reply-To: <20161222001346.GA4679@elstar.local>
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> <20161222001346.GA4679@elstar.local>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 21 Dec 2016 16:15:51 -0800
Message-ID: <CABCOCHTkYHd7z-4+PNTSfi=2wLqMO-pK46OVSkdb2MXr_Wvz=Q@mail.gmail.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Andy Bierman <andy@yumaworks.com>, Martin Bjorklund <mbj@tail-f.com>, "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="94eb2c1256661b5e1d0544342c34"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/7ET0oWtZrRuLmtwpDbh-Vp1Djdw>
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: Thu, 22 Dec 2016 00:15:55 -0000

On Wed, Dec 21, 2016 at 4:13 PM, Juergen Schoenwaelder <
j.schoenwaelder@jacobs-university.de> wrote:

> 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.
>
>
So have I ...
This is hierarchical data.
If the parent goes away, so do the child nodes.
Seems quite simple to understand.



> /js
>
>

Andy


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