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

Andy Bierman <andy@yumaworks.com> Thu, 22 December 2016 10:00 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 2E4E31297C5 for <netmod@ietfa.amsl.com>; Thu, 22 Dec 2016 02:00:26 -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 1pow1xLonxNs for <netmod@ietfa.amsl.com>; Thu, 22 Dec 2016 02:00:24 -0800 (PST)
Received: from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com [IPv6:2607:f8b0:400d:c0d::22c]) (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 B849E1297BE for <netmod@ietf.org>; Thu, 22 Dec 2016 02:00:23 -0800 (PST)
Received: by mail-qt0-x22c.google.com with SMTP id d45so8023278qta.1 for <netmod@ietf.org>; Thu, 22 Dec 2016 02:00:23 -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 :cc; bh=UMbU2tlxd3bsR+sOZNVzbCa1QT2VJ1v0GK8V+8WBKWI=; b=u40BzKuslUMWipbr0Gmv0OotifhREC/wjVxM1OZdnha6yMz1tIPKHDRrreRRZu6FW3 SoFlgBrJtDb2pGD2bJKlL0gJumWArq4HDnMMGFgtjplj0UQN7nFIB0OS0m5/xb5RMXEL zdtJ9rKMoh0xM9X9FrVSbFn6ibwILTG9uYazqFmisVnU55JR4OvMwhGX4F1RM3SMYBzo E4jGxs5RWU+v9IfpbV63vIZJGSeebEW3eJ8GnoEuu45+q1e9NjLAq+ZxKLtJjj2GWrXT Wx43E7AZs44UIycmeTvlLI1Z2WQhk6gHBtGDYqkjbIgk4i7wwwxGMrAf1/SIGPKxPvAb DylA==
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:cc; bh=UMbU2tlxd3bsR+sOZNVzbCa1QT2VJ1v0GK8V+8WBKWI=; b=mnZ9qxkOSO1wuVtrgu8wmV9GH/qmMvDx9Qa37SqA0KQUcfn8NKdDrcMLZ00hbrF+2d k3j5mrJei6rLBWoc0/cHKDSgyUPy1KVLaGb9S7gpJhbWRacV3YR29ERHLpEFucxryovT hO38b/8shkioDFXPJ9gxgCaRwcX3CaOYmYJ2Mks6ULUuodm/XDIm3dd6vhztYd+qr570 GiU9KBYlgxjRsyIsl2ad6g4kCld4UUsgi5aMhyCzR6ionFY4pEXsM7SwD19DLCiUnzUj p+v4gOVIOeYCIdEFvAtn7QNhXTMzEBvsGA7jiMUGdv19HqmZBa9CiB3z6TkchIAE3pqu 85mw==
X-Gm-Message-State: AIkVDXL9hUnaLsiLTPbhTgIZG6c6r3S2fHZ0vGH7cB2GYDjyl8wGuRDDtqQ3Q4fmJAbC5CNPU5F2POVcRva5Ew==
X-Received: by 10.200.37.52 with SMTP id 49mr8592477qtm.240.1482400822860; Thu, 22 Dec 2016 02:00:22 -0800 (PST)
MIME-Version: 1.0
Received: by 10.12.175.113 with HTTP; Thu, 22 Dec 2016 02:00:22 -0800 (PST)
In-Reply-To: <FD1A7B81-23CA-41EF-AD2D-342E53C9A890@nic.cz>
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> <75ad1f98-c927-ba4b-ea35-7197c89c0759@alumni.stanford.edu> <FD1A7B81-23CA-41EF-AD2D-342E53C9A890@nic.cz>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 22 Dec 2016 02:00:22 -0800
Message-ID: <CABCOCHS+doMN=JWP+1Y=RpEHhBHvUCA5EdJwJPVbhd9w7gGzTg@mail.gmail.com>
To: Ladislav Lhotka <lhotka@nic.cz>
Content-Type: multipart/alternative; boundary="001a1135b1ec764e3f05443c5601"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/DteSo9LJnizuFXGtDwYxbQhzYEU>
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
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 10:00:26 -0000

On Wed, Dec 21, 2016 at 11:49 PM, Ladislav Lhotka <lhotka@nic.cz> wrote:

>
> > On 22 Dec 2016, at 07:22, Randy Presuhn <randy_presuhn@alumni.
> stanford.edu> wrote:
> >
> > Hi -
> >
> > On 12/21/2016 3:55 PM, Andy Bierman wrote:
> >>
> >>
> >> On Wed, Dec 21, 2016 at 3:41 PM, Juergen Schoenwaelder
> >> <j.schoenwaelder@jacobs-university.de
> >> <mailto:j.schoenwaelder@jacobs-university.de>> wrote:
> > ...
> >>    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.
> >
> > Deprecating (or obsoleting) a definition does not orphan data nodes.
> > Perhaps I'm blinded by the way SNMP works, but it seems to me that
> > a robust client will need to be able to process data corresponding
> > to deprecated (or obsolete) definitions.  Likewise, developers
> > of server-side software may find themselves in situations where
> > supporting obsolete definitions is a commercial necessity.  Things
> > certainly played out that way in the SNMP world.  I agree with Juergen
> > that tool-generated warnings seem to be the correct way to go.
>
> I agree that making a node deprecated or obsolete doesn't mean that its
> descendants are orphaned, it just means they cannot be current, and then
> "current" shouldn't be the default status for them - also because the
> descendants may come from other modules (via groupings and augments) that
> cannot be changed.
>
> Even if the default status is inherited, tools can still generate
> warnings. A data modeller can decide whether and where it makes sense to
> have the "status" statement explicitly, but isn't forced to do it
> everywhere.
>
>

NETCONF and RESTCONF have no mechanisms for accessing data other than
top-down from the top-level YANG data node to the target node.
Removing an ancestor node from the server implementation effectively removes
the entire subtree from the implementation.  (The value of the YANG
status-stmt
of the descendant nodes has nothing to do with it)



> Lada
>

Andy


>
> >
> >> 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,
> >
> > No, they're not *gone*.  The *advisability* of implementing them has
> > changed, but the definitions still exist, and implementer judgement
> > is still needed.  The change in status only means that a client is
> > less able to rely on the assumption that those definitions will be
> > supported by a given system - but there's very little that it can
> > rely on being implemented anyway, so it doesn't really change much
> > for a robust client.
> >
> >> so ignoring the warning because YANG says the default is current seems
> >> unwise.
> >
> > I do agree with this bit of conclusion, but sometimes after looking
> > at a warning and considering the larger context, ignoring the
> > warning *is* the right thing to do.
> >
> > Randy
> >
> > _______________________________________________
> > netmod mailing list
> > netmod@ietf.org
> > https://www.ietf.org/mailman/listinfo/netmod
>
> --
> Ladislav Lhotka, CZ.NIC Labs
> PGP Key ID: 0xB8F92B08A9F76C67
>
>
>
>
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>