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

2017-01-19 Thread Phil Shafer
Robert Wilton writes: >Wouldn't you just write this without the back reference to the >deprecated/obsolete leaf. >E.g. wouldn't the following be sufficient to enforce the desired constraint? > leaf old-stuff { > status deprecated; > must not(../new-stuff); > } > leaf

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

2017-01-18 Thread Andy Bierman
On Wed, Jan 18, 2017 at 3:11 PM, Juergen Schoenwaelder < j.schoenwael...@jacobs-university.de> wrote: > On Wed, Jan 18, 2017 at 02:53:06PM -0800, Andy Bierman wrote: > > Hi, > > > > The reason the status-stmt is broken is because status=obsolete is not > > inherited from the parent. The status

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

2017-01-18 Thread Juergen Schoenwaelder
On Wed, Jan 18, 2017 at 02:53:06PM -0800, Andy Bierman wrote: > Hi, > > The reason the status-stmt is broken is because status=obsolete is not > inherited from the parent. The status obsolete means it is gone from the > server. > Since YANG data is hierarchical, any descendants of the obsolete

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

2017-01-18 Thread Andy Bierman
Hi, The reason the status-stmt is broken is because status=obsolete is not inherited from the parent. The status obsolete means it is gone from the server. Since YANG data is hierarchical, any descendants of the obsolete node are no longer accessible in any way. Andy On Wed, Jan 18, 2017 at

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

2017-01-18 Thread Phil Shafer
Martin Bjorklund writes: >But marking definition as obsolete in one module cannot automatically >make definitions in *other* modules obsolete. > >(*) _maybe_ 7950 can be interpreted in this way when it says: > > If a definition is "current", it MUST NOT reference a "deprecated" or > "obsolete"

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

2016-12-22 Thread Andy Bierman
On Thu, Dec 22, 2016 at 3:24 AM, Robert Wilton wrote: > > > On 22/12/2016 10:49, Martin Bjorklund wrote: > >> Robert Wilton wrote: >> >>> >>> On 22/12/2016 10:22, Martin Bjorklund wrote: >>> Robert Wilton wrote: > On

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

2016-12-22 Thread Robert Wilton
On 22/12/2016 10:49, Martin Bjorklund wrote: Robert Wilton wrote: On 22/12/2016 10:22, Martin Bjorklund wrote: Robert Wilton wrote: On 22/12/2016 10:00, Andy Bierman wrote: On Wed, Dec 21, 2016 at 11:49 PM, Ladislav Lhotka

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

2016-12-22 Thread Martin Bjorklund
Robert Wilton wrote: > > > On 22/12/2016 10:22, Martin Bjorklund wrote: > > Robert Wilton wrote: > >> > >> On 22/12/2016 10:00, Andy Bierman wrote: > >>> > >>> On Wed, Dec 21, 2016 at 11:49 PM, Ladislav Lhotka >>> >

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

2016-12-22 Thread Robert Wilton
On 22/12/2016 10:22, Martin Bjorklund wrote: Robert Wilton wrote: On 22/12/2016 10:00, Andy Bierman wrote: On Wed, Dec 21, 2016 at 11:49 PM, Ladislav Lhotka > wrote: > On 22 Dec 2016, at 07:22, Randy Presuhn

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

2016-12-22 Thread Martin Bjorklund
Robert Wilton wrote: > > > On 22/12/2016 10:00, Andy Bierman wrote: > > > > > > On Wed, Dec 21, 2016 at 11:49 PM, Ladislav Lhotka > > wrote: > > > > > > > On 22 Dec 2016, at 07:22, Randy Presuhn > >

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

2016-12-22 Thread Robert Wilton
On 22/12/2016 10:00, Andy Bierman wrote: On Wed, Dec 21, 2016 at 11:49 PM, Ladislav Lhotka > wrote: > On 22 Dec 2016, at 07:22, Randy Presuhn > wrote: > >

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

2016-12-22 Thread Andy Bierman
On Wed, Dec 21, 2016 at 11:49 PM, Ladislav Lhotka wrote: > > > On 22 Dec 2016, at 07:22, Randy Presuhn stanford.edu> wrote: > > > > Hi - > > > > On 12/21/2016 3:55 PM, Andy Bierman wrote: > >> > >> > >> On Wed, Dec 21, 2016 at 3:41 PM, Juergen

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

2016-12-21 Thread Andy Bierman
On Wed, Dec 21, 2016 at 4:13 PM, Juergen Schoenwaelder < j.schoenwael...@jacobs-university.de> wrote: > On Wed, Dec 21, 2016 at 03:55:16PM -0800, Andy Bierman wrote: > > On Wed, Dec 21, 2016 at 3:41 PM, Juergen Schoenwaelder < > > j.schoenwael...@jacobs-university.de> wrote: > > > > > On Wed, Dec

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

2016-12-21 Thread Juergen Schoenwaelder
On Wed, Dec 21, 2016 at 03:55:16PM -0800, Andy Bierman wrote: > On Wed, Dec 21, 2016 at 3:41 PM, Juergen Schoenwaelder < > j.schoenwael...@jacobs-university.de> wrote: > > > On Wed, Dec 21, 2016 at 02:47:49PM -0800, Andy Bierman wrote: > > > Hi, > > > > > > YANG data is hierarchical. > > > It

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

2016-12-21 Thread Andy Bierman
On Wed, Dec 21, 2016 at 3:41 PM, Juergen Schoenwaelder < j.schoenwael...@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

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

2016-12-21 Thread Juergen Schoenwaelder
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

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

2016-12-21 Thread Juergen Schoenwaelder
On Wed, Dec 21, 2016 at 08:21:08AM -0800, Andy Bierman wrote: > > IMO the default should be inherit from parent, like the config-stmt. > It clutters the YANG module to add a status-stmt to every descendant node. Yes, explicit status statements clutter the module but they make it very explicit

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

2016-12-21 Thread Andy Bierman
On Wed, Dec 21, 2016 at 2:54 AM, Martin Bjorklund wrote: > Andy Bierman wrote: > > On Wed, Dec 21, 2016 at 1:32 AM, Martin Bjorklund > wrote: > > > > > Ladislav Lhotka wrote: > > > > Martin Bjorklund

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

2016-12-21 Thread Ladislav Lhotka
> On 21 Dec 2016, at 14:47, Robert Wilton wrote: > > I think that it should be a error to have a current node under a deprecated > node in the same module, and similarly for deprecated/obsolete. I.e. to be > consistent with the following text from 7950 sec 7.21.2: > > 'If

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

2016-12-21 Thread Robert Wilton
I think that it should be a error to have a current node under a deprecated node in the same module, and similarly for deprecated/obsolete. I.e. to be consistent with the following text from 7950 sec 7.21.2: 'If a definition is "current", it MUST NOT reference a "deprecated" or"obsolete"

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

2016-12-21 Thread Martin Bjorklund
Ladislav Lhotka wrote: > > > On 21 Dec 2016, at 10:32, Martin Bjorklund wrote: > > > > Ladislav Lhotka wrote: > >> Martin Bjorklund writes: > >> > >>> Robert Wilton wrote: > Hi, > > The

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

2016-12-21 Thread Martin Bjorklund
Andy Bierman wrote: > On Wed, Dec 21, 2016 at 1:32 AM, Martin Bjorklund wrote: > > > Ladislav Lhotka wrote: > > > Martin Bjorklund writes: > > > > > > > Robert Wilton wrote: > > > >> Hi, > > > >> > > > >>

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

2016-12-21 Thread Andy Bierman
On Wed, Dec 21, 2016 at 1:32 AM, Martin Bjorklund wrote: > Ladislav Lhotka wrote: > > Martin Bjorklund writes: > > > > > Robert Wilton wrote: > > >> Hi, > > >> > > >> The definition of "status" in RFC 7950 in section 7.21.2

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

2016-12-21 Thread Ladislav Lhotka
> On 21 Dec 2016, at 10:32, Martin Bjorklund wrote: > > Ladislav Lhotka wrote: >> Martin Bjorklund writes: >> >>> Robert Wilton wrote: Hi, The definition of "status" in RFC 7950 in section 7.21.2 (full text

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

2016-12-21 Thread Martin Bjorklund
Ladislav Lhotka wrote: > Martin Bjorklund writes: > > > Robert Wilton wrote: > >> Hi, > >> > >> The definition of "status" in RFC 7950 in section 7.21.2 (full text > >> below), states: > >> > >> If no status is specified, the default is

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

2016-12-21 Thread Ladislav Lhotka
Martin Bjorklund writes: > Robert Wilton wrote: >> Hi, >> >> The definition of "status" in RFC 7950 in section 7.21.2 (full text >> below), states: >> >> If no status is specified, the default is "current". >> >> From my interpretation of the text in the

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

2016-12-20 Thread Andy Bierman
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

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

2016-12-20 Thread Martin Bjorklund
Robert Wilton wrote: > Hi, > > The definition of "status" in RFC 7950 in section 7.21.2 (full text > below), states: > > If no status is specified, the default is "current". > > From my interpretation of the text in the draft, this implies that the > status of the "new"

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

2016-12-20 Thread Robert Wilton
Hi, The definition of "status" in RFC 7950 in section 7.21.2 (full text below), states: If no status is specified, the default is "current". From my interpretation of the text in the draft, this implies that the status of the "new" child leaf in the following example is "current", and that