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

Andy Bierman <andy@yumaworks.com> Wed, 21 December 2016 23:55 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 218ED129573 for <netmod@ietfa.amsl.com>; Wed, 21 Dec 2016 15:55:20 -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 pkuqYBJ4DVZk for <netmod@ietfa.amsl.com>; Wed, 21 Dec 2016 15:55:18 -0800 (PST)
Received: from mail-qt0-x22d.google.com (mail-qt0-x22d.google.com [IPv6:2607:f8b0:400d:c0d::22d]) (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 582CB129516 for <netmod@ietf.org>; Wed, 21 Dec 2016 15:55:18 -0800 (PST)
Received: by mail-qt0-x22d.google.com with SMTP id c47so220889488qtc.2 for <netmod@ietf.org>; Wed, 21 Dec 2016 15:55:18 -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=om+9ADc0ivVItIEF0AQN/vz960VfY7WPMVyl5C/ILVM=; b=1wXSSzeIyob5/vhVD5dsFgC+VAjh9f+w8/NgMIg4coHsX0AQRrZOpGKttHpT69OTjg 81oLawmk4Uisr5yBAutNkFqCrQEEBR4Cufx4j7rgms5tHz6btu9esqROHsoK+qSrRJyF Of4/yl5Tz9Gr5ljxhv9hZT0e+/s1W1NOLcWbU6JtbcB2CXphAJ3qL0rcplAYgqcKYU8N QUdux4qqfT/Ncd8wQPp99sbkPuLlFETINOL/65cmf6jEuOL/oUsbPzWwdZrcU9lTqhFe TIWJ1ADG0oLzrdGLDMr277OzT1PON6EBhnWPcaJTqyP0eDWQP3s9ItjCzxdfw0dVkYXw /gdA==
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=om+9ADc0ivVItIEF0AQN/vz960VfY7WPMVyl5C/ILVM=; b=R3hdsBvxh2qH3bfD/aTV2bS/KCFCJuMlsmdm34kiipqvOOfg0uh/NnfgTCGc1XzY5E z4od7gwxcLPFm6SoxfxzyNw+bG/rrp5RThCbvpsNSD8ndB210QcPXXk+iKe/fYY8zLJx 8zHKlOnyR7Q2r6kcDs3p6AWAOcp6iq2Es8EemOx8CCTIPMSukUBGnbubrgoKjr1GjWOU syJbvl0rgHDHF7RY5m5xCEPeYmzup/Y9JNhd6YmXN05N6ocPf31qaPi0X227EKYn3FER nbYrZstEP2+70od3k7jd28vvDvBqCvl5LPxBg3VSsjxKqGzVSXHCWmk94FyOqU8f1VOY 4VfA==
X-Gm-Message-State: AIkVDXJfnF8lNhoAwPLy6qECjE4JeEyaigOUZzSCv5x9IAesSgX5QzOv1sN+P1sTaniFK1VolUaCOuPKehlhLg==
X-Received: by 10.237.51.167 with SMTP id v36mr7929435qtd.46.1482364517455; Wed, 21 Dec 2016 15:55:17 -0800 (PST)
MIME-Version: 1.0
Received: by 10.12.175.113 with HTTP; Wed, 21 Dec 2016 15:55:16 -0800 (PST)
In-Reply-To: <20161221234135.GA4630@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>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 21 Dec 2016 15:55:16 -0800
Message-ID: <CABCOCHRPiS9Og72nRtkwc__W_puH1euqU59qd-VrAUzWsiVeBA@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="94eb2c1256667e412b054433e2b1"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/CWOfRVmI0xmPaNAO17-wa8BhkGY>
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 23:55:20 -0000

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.



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