Hi,

I just checked the following YANG:

    container foo {
      status deprecated;
      leaf L1 {
         status current;
         type string;
      }
    }


pyang does not complain about it at all.
yangdump-pro issues a warning

Warning: Invalid status: child node 'L1' = 'current' and parent node 'foo'
= 'deprecated'
t1003.yang:9.7: warning(1024): invalid status for child node


IMO the status is inherited from its parent.
The entire subtree is deprecated or obsolete.
What does it even mean (from operations POV) to have an child nodes
that are current but the ancestors are not?


Andy



On Tue, Dec 20, 2016 at 12:15 PM, Juergen Schoenwaelder <
j.schoenwael...@jacobs-university.de> wrote:

> On Tue, Dec 20, 2016 at 09:03:35PM +0100, Martin Bjorklund wrote:
> >
> > However, we could have said that a current node under a deprecated
> > node (etc) in the same module is an error, in order to force people
> > (through the useage of YANG validators) to detect and fix this.
> >
>
> Is it an error or just something that deserves a warning and the
> author's attention? I am asking since we also have augmentations and
> if I mark a container as deprecated, this will not immediately cause
> an module augmenting the containter to get updated, hence I end up
> with definitions marked current in a deprecated container. And there
> are other situations where definitions may not be of the same status,
> i.e., a module (without import by revision) uses a type or grouping
> that in later revisions got marked deprecated. I think all of these
> status mismatches are things tools should warn about but I am not sure
> these are hard errors, in particular for 'deprecated'. Things may lead
> to stronger warnings for definitions marked 'obsolete'.
>
> /js
>
> --
> 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/>
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>
_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to