Re: [netmod] Order of evaluation for when?

2015-10-26 Thread Martin Bjorklund
Juergen Schoenwaelder wrote: > On Sat, Oct 24, 2015 at 03:07:41PM +0200, Martin Bjorklund wrote: > > Juergen Schoenwaelder wrote: > > > On Fri, Oct 23, 2015 at 10:35:48AM +0200, Ladislav Lhotka wrote: > > > > Martin

Re: [netmod] Order of evaluation for when?

2015-10-26 Thread Ladislav Lhotka
Andy Bierman writes: > Hi, > > I buy Martin's argument that "when" stmt is like "choice". > The draft says exactly what will happen if the constraint > is not satisfied. Why don't we require the client to delete > the old case and create the new case all at once? > > The

Re: [netmod] Order of evaluation for when?

2015-10-26 Thread Andy Bierman
On Mon, Oct 26, 2015 at 4:55 AM, Martin Bjorklund wrote: > Juergen Schoenwaelder wrote: > > On Sat, Oct 24, 2015 at 03:07:41PM +0200, Martin Bjorklund wrote: > > > Juergen Schoenwaelder wrote: > > > >

Re: [netmod] Order of evaluation for when?

2015-10-26 Thread Jonathan Hansford
October 2015 10:54 To: Andy Bierman;Juergen Schoenwaelder;Andy Bierman;Martin Bjorklund;Balazs Lengyel;netmod@ietf.org Subject: Re: [netmod] Order of evaluation for when? Andy Bierman <a...@yumaworks.com> writes: > Hi, > > I buy Martin's argument that "when" stmt is l

Re: [netmod] Order of evaluation for when?

2015-10-26 Thread Ladislav Lhotka
> On 26 Oct 2015, at 16:10, Andy Bierman wrote: > > > > On Mon, Oct 26, 2015 at 4:55 AM, Martin Bjorklund wrote: > Juergen Schoenwaelder wrote: > > On Sat, Oct 24, 2015 at 03:07:41PM +0200, Martin Bjorklund wrote: >

Re: [netmod] Order of evaluation for when?

2015-10-26 Thread Andy Bierman
On Mon, Oct 26, 2015 at 8:57 AM, Ladislav Lhotka wrote: > > > On 26 Oct 2015, at 16:10, Andy Bierman wrote: > > > > > > > > On Mon, Oct 26, 2015 at 4:55 AM, Martin Bjorklund > wrote: > > Juergen Schoenwaelder

Re: [netmod] Order of evaluation for when?

2015-10-25 Thread Martin Bjorklund
Andy Bierman wrote: > On Sat, Oct 24, 2015 at 6:07 AM, Martin Bjorklund wrote: > > > Juergen Schoenwaelder wrote: > > > On Fri, Oct 23, 2015 at 10:35:48AM +0200, Ladislav Lhotka wrote: > > > > Martin Bjorklund

Re: [netmod] Order of evaluation for when?

2015-10-25 Thread Andy Bierman
On Sun, Oct 25, 2015 at 6:58 AM, Martin Bjorklund wrote: > Andy Bierman wrote: > > On Sat, Oct 24, 2015 at 6:07 AM, Martin Bjorklund > wrote: > > > > > Juergen Schoenwaelder wrote: > > > > On Fri, Oct

Re: [netmod] Order of evaluation for when?

2015-10-25 Thread Martin Bjorklund
Andy Bierman wrote: > On Sun, Oct 25, 2015 at 6:58 AM, Martin Bjorklund wrote: > > > Andy Bierman wrote: > > > On Sat, Oct 24, 2015 at 6:07 AM, Martin Bjorklund > > wrote: > > > > > > > Juergen Schoenwaelder

Re: [netmod] Order of evaluation for when?

2015-10-24 Thread Andy Bierman
On Sat, Oct 24, 2015 at 6:07 AM, Martin Bjorklund wrote: > Juergen Schoenwaelder wrote: > > On Fri, Oct 23, 2015 at 10:35:48AM +0200, Ladislav Lhotka wrote: > > > Martin Bjorklund writes: > > > > > > > auto-deletion in

Re: [netmod] Order of evaluation for when?

2015-10-24 Thread Martin Bjorklund
Juergen Schoenwaelder wrote: > On Fri, Oct 23, 2015 at 10:35:48AM +0200, Ladislav Lhotka wrote: > > Martin Bjorklund writes: > > > > > auto-deletion in choice/when should be described as a property of the > > > data model for the datastore.

Re: [netmod] Order of evaluation for when?

2015-10-23 Thread Ladislav Lhotka
Andy Bierman writes: > On Wed, Oct 21, 2015 at 4:45 AM, Balazs Lengyel > wrote: > >> I would love to get rid of the autodelete feature. It really complicates >> things. >> > > > So how would when-stmt work? > It would be an error if a false

Re: [netmod] Order of evaluation for when?

2015-10-23 Thread Martin Bjorklund
Ladislav Lhotka wrote: > Martin Bjorklund writes: > > > Balazs Lengyel wrote: > >> Hello Lada, > >> The issue is what is "too much protocol details" ? > >> I agree that there are many things that are not part of the YANG > >>

Re: [netmod] Order of evaluation for when?

2015-10-23 Thread Ladislav Lhotka
Andy Bierman writes: > Hi, > > > I have to report that at least 1 customer agrees with you about > auto-deletion. > The comment was "how are we supposed to tell there is a bug in the client > if we do not get back an error instead of silent deletion?" This is not only a

Re: [netmod] Order of evaluation for when?

2015-10-23 Thread Ladislav Lhotka
> On 23 Oct 2015, at 10:58, Martin Bjorklund wrote: > > Ladislav Lhotka wrote: >> Martin Bjorklund writes: >> >>> Balazs Lengyel wrote: Hello Lada, The issue is what is "too much protocol details" ?

Re: [netmod] Order of evaluation for when?

2015-10-23 Thread Ladislav Lhotka
> On 23 Oct 2015, at 16:02, Andy Bierman wrote: > > > > On Fri, Oct 23, 2015 at 1:58 AM, Martin Bjorklund wrote: > Ladislav Lhotka wrote: > > Martin Bjorklund writes: > > > > > Balazs Lengyel

Re: [netmod] Order of evaluation for when?

2015-10-23 Thread Andy Bierman
On Fri, Oct 23, 2015 at 1:58 AM, Martin Bjorklund wrote: > Ladislav Lhotka wrote: > > Martin Bjorklund writes: > > > > > Balazs Lengyel wrote: > > >> Hello Lada, > > >> The issue is what is "too much protocol

Re: [netmod] Order of evaluation for when?

2015-10-23 Thread Juergen Schoenwaelder
On Fri, Oct 23, 2015 at 10:35:48AM +0200, Ladislav Lhotka wrote: > Martin Bjorklund writes: > > > auto-deletion in choice/when should be described as a property of the > > data model for the datastore. Parts of the text from Section 8.2.2 > > should be made more generic and

Re: [netmod] Order of evaluation for when?

2015-10-23 Thread Juergen Schoenwaelder
On Fri, Oct 23, 2015 at 02:42:26PM -0700, Andy Bierman wrote: > Auto-deletion avoids forcing the client to make multiple edits, > possibly leaving the datastore in a vulnerable state in between > edits. A single edit can say 'delete this, add that' and then you validate the result. This is

Re: [netmod] Order of evaluation for when?

2015-10-23 Thread Ladislav Lhotka
Martin Bjorklund writes: > Balazs Lengyel wrote: >> Hello Lada, >> The issue is what is "too much protocol details" ? >> I agree that there are many things that are not part of the YANG >> language/metamodel itself. On the other hand if a simple

Re: [netmod] Order of evaluation for when?

2015-10-22 Thread Andy Bierman
On Wed, Oct 21, 2015 at 4:45 AM, Balazs Lengyel wrote: > I would love to get rid of the autodelete feature. It really complicates > things. > So how would when-stmt work? It would be an error if a false when-stmt ever occurred? leaf X { type int32; } leaf Y

Re: [netmod] Order of evaluation for when?

2015-10-22 Thread Martin Bjorklund
Balazs Lengyel wrote: > Hello Lada, > The issue is what is "too much protocol details" ? > I agree that there are many things that are not part of the YANG > language/metamodel itself. On the other hand if a simple create leaf > operation on different interfaces can

Re: [netmod] Order of evaluation for when?

2015-10-22 Thread Balazs Lengyel
Hello, I STRONGLY agree with Andy, Interfaces MUST work the same way. Autodeletion MUST work or NOT work for all interfaces (Netconf, Restconf, CLI, GUI, etc.) the same way. IMO it is not a protocol issue. It is part of the YANG definition. The whole idea

Re: [netmod] Order of evaluation for when?

2015-10-22 Thread Ladislav Lhotka
> On 22 Oct 2015, at 12:45, Balazs Lengyel wrote: > > Hello, > I STRONGLY agree with Andy, Interfaces MUST work the same way. Autodeletion > MUST work or NOT work for all interfaces (Netconf, Restconf, CLI, GUI, etc.) > the same way. IMO it is not a protocol

Re: [netmod] Order of evaluation for when?

2015-10-22 Thread Balazs Lengyel
Hello, I would propose: Change "If the XPath expression references any node that also has associated "when" statements, these "when" expressions MUST be evaluated first." To "If the expression in a when statement is dependent on a data node controlled by another when or choice statement, the

Re: [netmod] Order of evaluation for when?

2015-10-22 Thread Andy Bierman
Hi, I have to report that at least 1 customer agrees with you about auto-deletion. The comment was "how are we supposed to tell there is a bug in the client if we do not get back an error instead of silent deletion?" A: use "must" instead of "when" and you will get an error right away. In

Re: [netmod] Order of evaluation for when?

2015-10-21 Thread Martin Bjorklund
Andy Bierman wrote: [...] > But the "when-stmt" never causes an error for application within > a datastore. > > The text in sec. 8 does not apply because the when-stmt is not > on any object in the RPC being processed. > > Only this text applies: > >The "when"

Re: [netmod] Order of evaluation for when?

2015-10-21 Thread Andy Bierman
On Wed, Oct 21, 2015 at 11:15 AM, Martin Bjorklund wrote: > Andy Bierman wrote: > > [...] > > > But the "when-stmt" never causes an error for application within > > a datastore. > > > > The text in sec. 8 does not apply because the when-stmt is not > > on

Re: [netmod] Order of evaluation for when?

2015-10-21 Thread Andy Bierman
On Wed, Oct 21, 2015 at 6:22 AM, Ladislav Lhotka wrote: > > > On 21 Oct 2015, at 15:07, Andy Bierman wrote: > > > > > > > > On Wed, Oct 21, 2015 at 5:46 AM, Ladislav Lhotka wrote: > > > > > On 21 Oct 2015, at 14:33, Andy Bierman

Re: [netmod] Order of evaluation for when?

2015-10-21 Thread Andy Bierman
On Wed, Oct 21, 2015 at 5:46 AM, Ladislav Lhotka wrote: > > > On 21 Oct 2015, at 14:33, Andy Bierman wrote: > > > > Hi, > > > > IMO we do not need lots of rules for when-stmt. > > They are harder to enforce than just implementing the auto-deletion. > > > >

Re: [netmod] Order of evaluation for when?

2015-10-21 Thread Ladislav Lhotka
> On 21 Oct 2015, at 15:07, Andy Bierman wrote: > > > > On Wed, Oct 21, 2015 at 5:46 AM, Ladislav Lhotka wrote: > > > On 21 Oct 2015, at 14:33, Andy Bierman wrote: > > > > Hi, > > > > IMO we do not need lots of rules for when-stmt. > >

Re: [netmod] Order of evaluation for when?

2015-10-21 Thread Balazs Lengyel
Hello Martin, I would want to codify this. My earlier proposal was: - when MUST NOT be dependent on a data node controlled by a when or choice statement Notice the strong MUST NOT statement. This would simplify life greatly. regards Balazs On 2015-10-20 10:09, Martin Bjorklund wrote: I have

Re: [netmod] Order of evaluation for when?

2015-10-21 Thread Ladislav Lhotka
> On 21 Oct 2015, at 14:33, Andy Bierman wrote: > > Hi, > > IMO we do not need lots of rules for when-stmt. > They are harder to enforce than just implementing the auto-deletion. > > Note that auto-deletion also applies to nodes already in candidate or running. > It is

Re: [netmod] Order of evaluation for when?

2015-10-21 Thread Balazs Lengyel
I would love to get rid of the autodelete feature. It really complicates things. regards Balazs On 2015-10-18 16:43, Ladislav Lhotka wrote: On 18 Oct 2015, at 11:52, Juergen Schoenwaelder wrote: On Thu, Oct 15, 2015 at 06:03:57PM +0200, Martin Bjorklund

Re: [netmod] Order of evaluation for when?

2015-10-20 Thread Ladislav Lhotka
> On 19 Oct 2015, at 21:04, Juergen Schoenwaelder > wrote: > > On Sun, Oct 18, 2015 at 08:22:25AM -0700, Andy Bierman wrote: >> On Sun, Oct 18, 2015 at 7:43 AM, Ladislav Lhotka wrote: >> >>> On 18 Oct 2015, at 11:52, Juergen

Re: [netmod] Order of evaluation for when?

2015-10-20 Thread Andy Bierman
On Tue, Oct 20, 2015 at 1:09 AM, Martin Bjorklund wrote: > Ladislav Lhotka wrote: > > > > > On 19 Oct 2015, at 21:22, Andy Bierman wrote: > > > > > > > > > > > > On Mon, Oct 19, 2015 at 12:04 PM, Juergen Schoenwaelder > > >

Re: [netmod] Order of evaluation for when?

2015-10-20 Thread Ladislav Lhotka
> On 19 Oct 2015, at 21:22, Andy Bierman wrote: > > > > On Mon, Oct 19, 2015 at 12:04 PM, Juergen Schoenwaelder > wrote: > On Sun, Oct 18, 2015 at 08:22:25AM -0700, Andy Bierman wrote: > > On Sun, Oct 18, 2015 at 7:43 AM, Ladislav

Re: [netmod] Order of evaluation for when?

2015-10-20 Thread Martin Bjorklund
Ladislav Lhotka wrote: > > > On 19 Oct 2015, at 21:22, Andy Bierman wrote: > > > > > > > > On Mon, Oct 19, 2015 at 12:04 PM, Juergen Schoenwaelder > > wrote: > > On Sun, Oct 18, 2015 at 08:22:25AM -0700, Andy Bierman

Re: [netmod] Order of evaluation for when?

2015-10-20 Thread Ladislav Lhotka
> On 20 Oct 2015, at 10:09, Martin Bjorklund wrote: > > Ladislav Lhotka wrote: >> >>> On 19 Oct 2015, at 21:22, Andy Bierman wrote: >>> >>> >>> >>> On Mon, Oct 19, 2015 at 12:04 PM, Juergen Schoenwaelder >>>

Re: [netmod] Order of evaluation for when?

2015-10-18 Thread Juergen Schoenwaelder
On Thu, Oct 15, 2015 at 06:03:57PM +0200, Martin Bjorklund wrote: > > Ok, you're right. 8.2.1 should be kept as it is. (we may need to > rephrase the intro text in 8.2) But I think Balazs is also right. > Suppose you have: > > leaf a { > when "../b = 42"; > type int32; > } > leaf

Re: [netmod] Order of evaluation for when?

2015-10-18 Thread Martin Bjorklund
Juergen Schoenwaelder wrote: > On Thu, Oct 15, 2015 at 06:03:57PM +0200, Martin Bjorklund wrote: > > > > Ok, you're right. 8.2.1 should be kept as it is. (we may need to > > rephrase the intro text in 8.2) But I think Balazs is also right. > > Suppose you

Re: [netmod] Order of evaluation for when?

2015-10-18 Thread Ladislav Lhotka
> On 18 Oct 2015, at 11:52, Juergen Schoenwaelder > wrote: > > On Thu, Oct 15, 2015 at 06:03:57PM +0200, Martin Bjorklund wrote: >> >> Ok, you're right. 8.2.1 should be kept as it is. (we may need to >> rephrase the intro text in 8.2) But I think Balazs

Re: [netmod] Order of evaluation for when?

2015-10-16 Thread Andy Bierman
On Fri, Oct 16, 2015 at 12:49 PM, Martin Bjorklund wrote: > Andy Bierman wrote: > > Hi, > > > > I find all this fretting over when-stmt corner-cases to be a waste of > time. > > I certainly have no intention of spending 100s of hours coding for > >

Re: [netmod] Order of evaluation for when?

2015-10-16 Thread Ladislav Lhotka
> On 15 Oct 2015, at 18:03, Martin Bjorklund wrote: > > Andy Bierman wrote: >> On Thu, Oct 15, 2015 at 4:53 AM, Martin Bjorklund wrote: >> >>> Andy Bierman wrote: Hi, You are incorrect.

Re: [netmod] Order of evaluation for when?

2015-10-16 Thread Martin Bjorklund
Hi, Balazs Lengyel wrote: > Hello Andy, Martin, > If that is what is meant by 8.2.1 then I have a few comments Sorry for the confusion on this topic. I have now done some digging in the archives and I think that section 8.2 is really intended to apply only to

Re: [netmod] Order of evaluation for when?

2015-10-16 Thread Balazs Lengyel
Hello, AFAIK the document order in edit-config was not seen as important till today, with the single exception : - user-ordered list/leaf-list Making it significant now would be a new concept. I don't want that. It makes it more difficult to make a correct edit-config. So Scenario B(2) and C

Re: [netmod] Order of evaluation for when?

2015-10-16 Thread Martin Bjorklund
Ladislav Lhotka wrote: > > > On 16 Oct 2015, at 12:27, Balazs Lengyel > > wrote: > > > > IMHO YANG should define the behavoir, and I would want it to be the > > same on Netconf/Restconf/CLI etc. > > I agree that " 1) you get an error back" would be

Re: [netmod] Order of evaluation for when?

2015-10-16 Thread Ladislav Lhotka
> On 16 Oct 2015, at 12:27, Balazs Lengyel wrote: > > IMHO YANG should define the behavoir, and I would want it to be the same on > Netconf/Restconf/CLI etc. > I agree that " 1) you get an error back" would be the best: because it is the > easiest to understand

Re: [netmod] Order of evaluation for when?

2015-10-16 Thread Andy Bierman
Hi, I find all this fretting over when-stmt corner-cases to be a waste of time. I certainly have no intention of spending 100s of hours coding for corner-cases that have no operational value whatsoever. When-stmt has always been full of problems that exist on paper but not in real servers.

Re: [netmod] Order of evaluation for when?

2015-10-16 Thread Balazs Lengyel
Hello, We already have embedded choice and when in choice in the OSPF module https://tools.ietf.org/html/draft-ietf-ospf-yang-02. So unless we do something fast the nasty complications will be happenning. regards Balazs On 2015-10-16 17:37, Ladislav Lhotka wrote: On 16 Oct 2015, at 17:03,

Re: [netmod] Order of evaluation for when?

2015-10-16 Thread Xiang Li
On 10/16/2015 2:49 PM, Martin Bjorklund wrote: Andy Bierman wrote: Hi, I find all this fretting over when-stmt corner-cases to be a waste of time. I certainly have no intention of spending 100s of hours coding for corner-cases that have no operational value whatsoever.

Re: [netmod] Order of evaluation for when?

2015-10-15 Thread Martin Bjorklund
Andy Bierman wrote: > Hi, > > You are incorrect. > > Within the PAYLOAD (as this section describes), there is no when-stmt > for data nodes within the datastore. Look at the YANG for edit-config. > There are no when-stmts for "interface" in "edit-config". Andy, there is

Re: [netmod] Order of evaluation for when?

2015-10-15 Thread Andy Bierman
Hi, You are incorrect. Within the PAYLOAD (as this section describes), there is no when-stmt for data nodes within the datastore. Look at the YANG for edit-config. There are no when-stmts for "interface" in "edit-config". So explain which constraint in the payload is being violated? Andy

Re: [netmod] Order of evaluation for when?

2015-10-15 Thread Balazs Lengyel
See below, Balazs On 2015-10-14 23:06, Andy Bierman wrote: On Wed, Oct 14, 2015 at 1:26 PM, Martin Bjorklund wrote: Andy Bierman wrote:

Re: [netmod] Order of evaluation for when?

2015-10-15 Thread Balazs Lengyel
Hello, I had the same interpretation as Martin. The when could be on the config database model. Not just on the when defined in a definition of an rpc or action. regards Balazs On 2015-10-15 17:02, Andy Bierman wrote:

Re: [netmod] Order of evaluation for when?

2015-10-15 Thread Andy Bierman
On Thu, Oct 15, 2015 at 4:53 AM, Martin Bjorklund wrote: > Andy Bierman wrote: > > Hi, > > > > You are incorrect. > > > > Within the PAYLOAD (as this section describes), there is no when-stmt > > for data nodes within the datastore. Look at the YANG for

Re: [netmod] Order of evaluation for when?

2015-10-15 Thread Andy Bierman
Hi, Show me the text that says an anyxml passes the constraints of the hidden data models through to the RPC processing. The error for false-when only applies to parameters specified in the RPC. The processing of the rpc-stmt does not have any when-stmts that need to be checked. The config data

Re: [netmod] Order of evaluation for when?

2015-10-14 Thread Martin Bjorklund
Andy Bierman wrote: > On Wed, Oct 14, 2015 at 12:25 PM, Martin Bjorklund wrote: > > > Balazs Lengyel wrote: > > > Hello Martin, > > > I agree that A1 is what follows the spirit of YANG, but then IMHO you > > > should

Re: [netmod] Order of evaluation for when?

2015-10-14 Thread Martin Bjorklund
Andy Bierman wrote: > On Wed, Oct 14, 2015 at 12:48 PM, Martin Bjorklund wrote: > > > Andy Bierman wrote: > > > On Wed, Oct 14, 2015 at 12:25 PM, Martin Bjorklund > > wrote: > > > > > > > Balazs Lengyel

Re: [netmod] Order of evaluation for when?

2015-10-14 Thread Andy Bierman
On Wed, Oct 14, 2015 at 12:25 PM, Martin Bjorklund wrote: > Balazs Lengyel wrote: > > Hello Martin, > > I agree that A1 is what follows the spirit of YANG, but then IMHO you > > should change/correct 8.2.1 in YANG because that implies A2 and error.

Re: [netmod] Order of evaluation for when?

2015-10-13 Thread Balazs Lengyel
Hello Martin, I agree that A1 is what follows the spirit of YANG, but then IMHO you should change/correct 8.2.1 in YANG because that implies A2 and error. regards Balazs On 2015-10-13 13:30, Martin Bjorklund wrote: Balazs Lengyel wrote: Hello Martin, If I had a