Re: [netmod] 'status' statement needed on every node

Martin Bjorklund <mbj@tail-f.com> Wed, 06 September 2017 06:53 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 F2D9513235C for <netmod@ietfa.amsl.com>; Tue, 5 Sep 2017 23:53:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 8Uo7aTX4-DQs for <netmod@ietfa.amsl.com>; Tue, 5 Sep 2017 23:53:56 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 88C06126E7A for <netmod@ietf.org>; Tue, 5 Sep 2017 23:53:56 -0700 (PDT)
Received: from localhost (unknown [173.38.220.41]) by mail.tail-f.com (Postfix) with ESMTPSA id 925A11AE0187; Wed, 6 Sep 2017 08:53:55 +0200 (CEST)
Date: Wed, 06 Sep 2017 08:52:22 +0200
Message-Id: <20170906.085222.355333494940576314.mbj@tail-f.com>
To: andy@yumaworks.com
Cc: kwatsen@juniper.net, netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <CABCOCHTycfsSi11Jfsrs=mFstzYg3257JtFGqgKGr-NpR8rxgQ@mail.gmail.com>
References: <20170905190151.fizr5dljufbyuyty@elstar.local> <B1BB11D4-9051-458E-ACCE-991ADEA4884A@juniper.net> <CABCOCHTycfsSi11Jfsrs=mFstzYg3257JtFGqgKGr-NpR8rxgQ@mail.gmail.com>
X-Mailer: Mew version 6.7 on Emacs 24.5 / 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/b630CneEg32tWwYg_g_B4hf1Xwo>
Subject: Re: [netmod] 'status' statement needed on every node
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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, 06 Sep 2017 06:53:58 -0000

Andy Bierman <andy@yumaworks.com> wrote:
> On Tue, Sep 5, 2017 at 3:50 PM, Kent Watsen <kwatsen@juniper.net> wrote:
> 
> >
> >
> >
> > >> I still don't know what it means to define hierarchical data and say the
> > >> parent is deprecated but not the descendant nodes.
> > >
> > > It is odd but can happen anyway. A current augmentation of something
> > > that got deprecated likely stays current. I would hope that tools warn
> > > if they see this but that's it.
> >
> > This example seems to provide support for saying status should be
> > inherited.  But, to be clear, you agree that if a parent is deprecated,
> > than its decedents should be deprecated as well, right?
> >
> >
> >
> right -- the RFC says this has to be done manually.
> A missing status-stmt means status=current.
> 
> 
> 
> >
> > >> This is rather non-intuitive, as is the idea that all descendant
> > >> nodes need to be manually edited (status is not inherited).
> > >
> > > Not a big deal. The benefit is that a reader like me knows clear that
> > > the definition I am look at is deprecated, no need to search backwards
> > > to find out.
> >
> > tree diagrams do this too, though I like Martin's approach of removing
> > the deprecated -state trees from the tree diagram altogether.
> >
> >
> >
> > >> It also means the objects expanded from groupings cannot ever be
> > >> changed (clearly a bug in YANG).
> > >
> > > Yes, bug in YANG.
> >
> > Is this the same issue I raised?
> >
> >   import ietf-foo {
> >     prefix f;
> >   }
> >
> >   container bar {
> >     uses f:foo;
> >   }
> >
> >   container baz {
> >     status deprecated;
> >     uses f:foo;            <-- oops, descendants not deprecated!
> >   }                           (not a problem if status inherited)

As Andy explains below, this should be:

   container baz {
     status deprecated;
     uses f:foo {
       status deprecated;
     }
   }

> According to my interpretation of 7.21.2, this is a MUST NOT:
> 
>    If a definition is "current", it MUST NOT reference a "deprecated" or
>    "obsolete" definition within the same module.
> 
>    If a definition is "deprecated", it MUST NOT reference an "obsolete"
>    definition within the same module.
> 
>    For example, the following is illegal:
> 
>      typedef my-type {
>        status deprecated;
>        type int32;
>      }
> 
>      leaf my-leaf {
>        status current;
>        type my-type; // illegal, since my-type is deprecated
>      }
> 
> The term "reference" is not really defined above.
> It should also clearly apply to "uses" (e.g., your example) and  leafref
> path-stmt.
> 
>    leaf foo {
>      type string;
>      status deprecated;
>   }
> 
>   leaf bar {
>     type leafref { path /foo; }
>   }
> 
> If it apples to path-stmt, then why not all XPath?

B/c in XPath it is even ok to refer to non-existing nodes.  And you
might have things like /baz/*.

> Why doesn't "reference" include descendant nodes?
> 
> The text in 7950 is too strict and can cause a massive ripple-effect when
> any status-stmt is changed.
>  At the same time it is too vague to be useful to implementors.

While I agree that it is not clear what it means to have a "current"
child to a "deprecated" node, I don't think this is a big issue.  If a
node is deprecated, it is ok for an implementation to not implement
it.  Obviously this means that no child nodes to that node is
implemented either, regardless of their status, if they are augmented
in, or comes from a grouping.



/martin