[netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Balazs Lengyel
Hello, I propose a small clarification to the yang draft as described below. regards Balazs Forwarded Message Subject: Re: Leafref and require-instance=false

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Juergen Schoenwaelder
RFC 6020 section 9.9: The leafref type is used to reference a particular leaf instance in the data tree. The "path" substatement (Section 9.9.2) selects a set of leaf instances, and the leafref value space is the set of values of these leaf instances. I think the last statement above

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Ladislav Lhotka
Juergen Schoenwaelder writes: > RFC 6020 section 9.9: > >The leafref type is used to reference a particular leaf instance in >the data tree. The "path" substatement (Section 9.9.2) selects a set >of leaf instances, and the leafref value space is the set of values >of these leaf i

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Martin Bjorklund
Ladislav Lhotka wrote: > Juergen Schoenwaelder writes: > > > RFC 6020 section 9.9: > > > >The leafref type is used to reference a particular leaf instance in > >the data tree. The "path" substatement (Section 9.9.2) selects a set > >of leaf instances, and the leafref value space is

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Juergen Schoenwaelder
On Mon, Jun 08, 2015 at 03:22:11PM +0200, Ladislav Lhotka wrote: > Juergen Schoenwaelder writes: > > > RFC 6020 section 9.9: > > > >The leafref type is used to reference a particular leaf instance in > >the data tree. The "path" substatement (Section 9.9.2) selects a set > >of leaf i

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Kent Watsen
> Otherwise, the leafref value MUST be a valid value of the > data type that is defined for the referenced leaf. Is it a MUST or a SHOULD? Obviously, if it's not a valid value, a match will never occur, but that's a user error, no? It comes down to a validation warning versus a validation erro

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Ladislav Lhotka
> On 08 Jun 2015, at 16:40, Kent Watsen wrote: > > >> Otherwise, the leafref value MUST be a valid value of the >> data type that is defined for the referenced leaf. > > > Is it a MUST or a SHOULD? > > Obviously, if it's not a valid value, a match will never occur, but that's > a user error,

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Kent Watsen
>I think the two leafs are coupled through the path statement and so the >values of both should conform to the same type. If I extend Balazs¹ >example with uint8 and 1..10 range: > >1. Would a leafref value of 256 be acceptable? > >2. How about "foo"? I agree it doesn't makes sense, but is the

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Ladislav Lhotka
> On 08 Jun 2015, at 17:39, Kent Watsen wrote: > > > > >> I think the two leafs are coupled through the path statement and so the >> values of both should conform to the same type. If I extend Balazs¹ >> example with uint8 and 1..10 range: >> >> 1. Would a leafref value of 256 be acceptable?

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Andy Bierman
On Mon, Jun 8, 2015 at 8:39 AM, Kent Watsen wrote: > > > >>I think the two leafs are coupled through the path statement and so the >>values of both should conform to the same type. If I extend Balazs¹ >>example with uint8 and 1..10 range: >> >>1. Would a leafref value of 256 be acceptable? >> >>2.

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Martin Bjorklund
Andy Bierman wrote: > On Mon, Jun 8, 2015 at 8:39 AM, Kent Watsen wrote: > > > > > > > >>I think the two leafs are coupled through the path statement and so the > >>values of both should conform to the same type. If I extend Balazs¹ > >>example with uint8 and 1..10 range: > >> > >>1. Would a leaf

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Kent Watsen
On 6/8/15, 12:33 PM, "Martin Bjorklund" wrote: >Andy Bierman wrote: >> On Mon, Jun 8, 2015 at 8:39 AM, Kent Watsen wrote: >>> The leafref is marked require-instance=false, it just means a matching >> > condition will never succeed. >> > >> >> If require-instance = false then the node must con

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Ladislav Lhotka
Andy Bierman writes: > On Mon, Jun 8, 2015 at 8:39 AM, Kent Watsen wrote: >> >> >> >>>I think the two leafs are coupled through the path statement and so the >>>values of both should conform to the same type. If I extend Balazs¹ >>>example with uint8 and 1..10 range: >>> >>>1. Would a leafref va

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Andy Bierman
On Mon, Jun 8, 2015 at 11:49 AM, Ladislav Lhotka wrote: > Andy Bierman writes: > >> On Mon, Jun 8, 2015 at 8:39 AM, Kent Watsen wrote: >>> >>> >>> I think the two leafs are coupled through the path statement and so the values of both should conform to the same type. If I extend Balazs¹ >

Re: [netmod] Fwd: Re: Leafref and require-instance=false

2015-06-08 Thread Martin Bjorklund
Ladislav Lhotka wrote: > Andy Bierman writes: > > > On Mon, Jun 8, 2015 at 8:39 AM, Kent Watsen wrote: > >> > >> > >> > >>>I think the two leafs are coupled through the path statement and so the > >>>values of both should conform to the same type. If I extend Balazs¹ > >>>example with uint8 and