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

Martin Bjorklund <mbj@tail-f.com> Thu, 22 December 2016 10:22 UTC

Return-Path: <mbj@tail-f.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 360051296FF for <netmod@ietfa.amsl.com>; Thu, 22 Dec 2016 02:22:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.001
X-Spam-Level:
X-Spam-Status: No, score=-5.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-3.1, SPF_PASS=-0.001] 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 8q-rb_JeTNYF for <netmod@ietfa.amsl.com>; Thu, 22 Dec 2016 02:22:44 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id D1B27129469 for <netmod@ietf.org>; Thu, 22 Dec 2016 02:22:43 -0800 (PST)
Received: from localhost (h-13-76.a165.priv.bahnhof.se [155.4.13.76]) by mail.tail-f.com (Postfix) with ESMTPSA id B881F1AE028C; Thu, 22 Dec 2016 11:22:42 +0100 (CET)
Date: Thu, 22 Dec 2016 11:22:42 +0100
Message-Id: <20161222.112242.1766522035191268644.mbj@tail-f.com>
To: rwilton@cisco.com
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <8ac64b13-469c-31fe-9d2b-ad0487204d69@cisco.com>
References: <FD1A7B81-23CA-41EF-AD2D-342E53C9A890@nic.cz> <CABCOCHS+doMN=JWP+1Y=RpEHhBHvUCA5EdJwJPVbhd9w7gGzTg@mail.gmail.com> <8ac64b13-469c-31fe-9d2b-ad0487204d69@cisco.com>
X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/NcxhsSMBEOuF74o3kb01qMMcsaI>
Cc: 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:22:45 -0000

Robert Wilton <rwilton@cisco.com> wrote:
> 
> 
> On 22/12/2016 10:00, Andy Bierman wrote:
> >
> >
> > On Wed, Dec 21, 2016 at 11:49 PM, Ladislav Lhotka <lhotka@nic.cz
> > <mailto:lhotka@nic.cz>> wrote:
> >
> >
> >     > On 22 Dec 2016, at 07:22, Randy Presuhn
> >     <randy_presuhn@alumni.stanford.edu
> >     <mailto: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>
> >     >> <mailto: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)
> 
> I agree that this certainly seems to be the case if a node is marked
> as obsolete.  It seems that it implicitly forces all child nodes to be
> obsolete as well regardless of which module they were defined in.

No I don't think this is correct.  If module B augment X in module A,
and X is obsolete, it does NOT mean that the augmented nodes in B are
automatically obsolete.  However, in an implementation that doesn't
implement X, the augmented nodes from B are obviously also not
implemented.


/martin