Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config false"

2023-11-24 Thread Italo Busi
Hi Med, all,

I have a mixed feeling about this proposal

I understand the need to report the actual state in the operational datastore 
and IMHO this is a MUST requirement for any implementation

However, there are some cases where it is still desirable to express a level of 
requirement to the server implementation. For example, I have seen examples 
where a state leaf has been marked as mandatory because in the reference 
standard it is mandatory to report this information and the authors of the YANG 
model wanted to keep compliance with the reference standard

I am also wondering whether recommending not to use YANG syntax constraints 
would not encourage describing these standard requirements on the server 
implementation using the description statements

Moreover, my understanding of the text in RFC8342 is that:
*   when the server is not fully compliant with the reference standard and 
does not support reporting the information in a mandatory true leaf, it SHOULD 
flag this lack of compliancy using the deviation statement;
*   when the server is fully compliant with the reference standard but, due 
to an expected condition, it is not able to report a mandatory true leaf it can 
omit this from the operational datastore;
*   the client should not assume that the mandatory true leaves are always 
present (or in general that the YANG constraints are always satisfied by the 
operational data store)

Therefore I am wondering whether we would like to discourage people who are 
willing to define some requirements on the server behavior to use YANG 
constraints to achieve that

Regarding the original question (i.e., the need for the error-message), I think 
they might be useful when doing offline validation of the operational data store

Italo

> -Original Message-
> From: mohamed.boucad...@orange.com
> 
> Sent: giovedì 16 novembre 2023 10:33
> To: Kent Watsen ; Jason Sterne (Nokia)
> ; Jürgen Schönwälder
> ; netmod@ietf.org; Rob Wilton
> (rwilton) 
> Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message
> for "config false"
>
> Hi all,
>
> Thank you all for the feedback.
>
> Here is the text I suggest to capture the outcome of the discussion:
>
>Section 8.1 of [RFC7950] includes a provision for defining a
>constraint on state data and specifies that the constraint must be
>true in a valid state data.  However, Section 5.3 of [RFC8342] soften
>that behavior by allowing semantic constraints to be violated under
>some circumstances to help detecting anomalies.  Relaxing validation
>constraints on state data is meant to reveal deviations of the
>observed behavior vs. intended behavior of a managed entity and
>hopefully trigger corrective actions by a management system.  From
>that perspective, it is RECOMMENDED to avoid defining constraints on
>state data that would hinder the detection of abnormal behaviors of a
>managed entity.
>
> Comments are still welcome.
>
> You can also proposed change here:
> https://github.com/boucadair/rfc8407bis/pull/24/files
>
> Thanks.
>
> Cheers,
> Med
>
> > -Message d'origine-
> > De : netmod mailto:netmod-boun...@ietf.org>> De la 
> > part de Kent Watsen
> Envoyé
> > : mardi 7 novembre 2023 09:17 À : Jason Sterne (Nokia)
> > mailto:jason.ste...@nokia.com>> Cc : Jürgen 
> > Schönwälder
> > mailto:jschoenwaelder@constructor.university>>;
> > netmod@ietf.org<mailto:netmod@ietf.org>; Rob Wilton (rwilton)
> > mailto:rwilton=40cisco@dmarc.ietf.org>>
> > Objet : Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-
> > message for "config false"
> >
> > My confusion, sorry, I was thinking "mandatory".
> >
> > Must statements on opstate are useful, but less important.
> >
> > Kent
> >
> >
> > > On Nov 6, 2023, at 5:26 PM, Kent Watsen 
> > > mailto:k...@watsen.net>> wrote:
> > >
> > > "Must" statements on opstate usefully helps clients know when
> > certain values will always appear, enabling better optimization and
> > usability.
> > >
> > > E.g., for Syslog messages, there must always be a timestamp,
> > severity, and a message.  It would be unhelpful for the server to not
> > declare its intention to always send these fields.
> > >
> > > Kent
> > >
> > >
> > >> On Nov 6, 2023, at 10:49 AM, Jason Sterne (Nokia)
> > mailto:jason.ste...@nokia.com>> wrote:
> > >>
> > >> +1 on what Jurgen and Rob are pointing out here.
> > >>
> > >> I'm not sure it makes a ton of sense to actually have a lot of
>

Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config false"

2023-11-16 Thread mohamed . boucadair
Re, 

Thanks, Jürgern.

Please see inline.

Cheers,
Med

> -Message d'origine-
> De : Jürgen Schönwälder 
> Envoyé : jeudi 16 novembre 2023 11:30
> À : BOUCADAIR Mohamed INNOV/NET 
> Cc : Kent Watsen ; Jason Sterne (Nokia)
> ; netmod@ietf.org; Rob Wilton (rwilton)
> 
> Objet : Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-
> message for "config false"
> 
> I think an important piece is missing here is, namely _who_ is doing
> the validation and who is in charge of keeping things valid. For
> config data, the server has the task to keep the config datastores
> valid (or more precisely the resulting intended configuration).
> 

[Med] Yeah, but I assume that is known.

> For state data, if the server's state does not satisfy the
> constraints, then this is what the server's true state is.

[Med] Agree.

 It is then
> at best a client's job to check whether a server's state is valid.
> (And then there are subtleties like whether it is at all feasible for
> a client to obtain a consistent snapshot of the server's state.)

[Med] Agree on the client part. That was the intent of this part of the text: 

 " observed behavior vs. intended behavior of a managed entity and
   hopefully trigger corrective actions by a management system."

I tried to avoid diverting much on whether/how this is done.

> 
> /js
> 
> On Thu, Nov 16, 2023 at 09:33:05AM +, mohamed.boucad...@orange.com
> wrote:
> > Hi all,
> >
> > Thank you all for the feedback.
> >
> > Here is the text I suggest to capture the outcome of the discussion:
> >
> >Section 8.1 of [RFC7950] includes a provision for defining a
> >constraint on state data and specifies that the constraint must
> be
> >true in a valid state data.  However, Section 5.3 of [RFC8342]
> soften
> >that behavior by allowing semantic constraints to be violated
> under
> >some circumstances to help detecting anomalies.  Relaxing
> validation
> >constraints on state data is meant to reveal deviations of the
> >observed behavior vs. intended behavior of a managed entity and
> >hopefully trigger corrective actions by a management system.
> From
> >that perspective, it is RECOMMENDED to avoid defining constraints
> on
> >state data that would hinder the detection of abnormal behaviors
> of a
> >managed entity.
> >
> > Comments are still welcome.
> >
> > You can also proposed change here:
> >
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> >
> ub.com%2Fboucadair%2Frfc8407bis%2Fpull%2F24%2Ffiles=05%7C01%7Cmoh
> >
> amed.boucadair%40orange.com%7Cf0eabc06cf0f4c9a77dc08dbe68f0080%7C90c7a
> >
> 20af34b40bfbc48b9253b6f5d20%7C0%7C0%7C638357274079883264%7CUnknown%7CT
> >
> WFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI
> >
> 6Mn0%3D%7C3000%7C%7C%7C=gosEFikCJxcPPyDzp240dCRRbTnpF7jyQWDD6SKW
> > ioI%3D=0
> >
> > Thanks.
> >
> > Cheers,
> > Med
> >
> > > -Message d'origine-
> > > De : netmod  De la part de Kent Watsen
> > > Envoyé : mardi 7 novembre 2023 09:17 À : Jason Sterne (Nokia)
> > >  Cc : Jürgen Schönwälder
> > > ;
> > > netmod@ietf.org; Rob Wilton (rwilton)
> > > 
> > > Objet : Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-
> > > message for "config false"
> > >
> > > My confusion, sorry, I was thinking "mandatory".
> > >
> > > Must statements on opstate are useful, but less important.
> > >
> > > Kent
> > >
> > >
> > > > On Nov 6, 2023, at 5:26 PM, Kent Watsen  wrote:
> > > >
> > > > "Must" statements on opstate usefully helps clients know when
> > > certain values will always appear, enabling better optimization
> and
> > > usability.
> > > >
> > > > E.g., for Syslog messages, there must always be a timestamp,
> > > severity, and a message.  It would be unhelpful for the server to
> > > not declare its intention to always send these fields.
> > > >
> > > > Kent
> > > >
> > > >
> > > >> On Nov 6, 2023, at 10:49 AM, Jason Sterne (Nokia)
> > >  wrote:
> > > >>
> > > >> +1 on what Jurgen and Rob are pointing out here.
> > > >>
> > > >> I'm not sure it makes a ton of sense to actually have a lot of
> > > "must" statements in state models. We could consider discouraging
> > > them?  (but we ne

Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config false"

2023-11-16 Thread Jürgen Schönwälder
I think an important piece is missing here is, namely _who_ is doing
the validation and who is in charge of keeping things valid. For
config data, the server has the task to keep the config datastores
valid (or more precisely the resulting intended configuration).

For state data, if the server's state does not satisfy the
constraints, then this is what the server's true state is. It is then
at best a client's job to check whether a server's state is valid.
(And then there are subtleties like whether it is at all feasible for
a client to obtain a consistent snapshot of the server's state.)

/js

On Thu, Nov 16, 2023 at 09:33:05AM +, mohamed.boucad...@orange.com wrote:
> Hi all, 
> 
> Thank you all for the feedback. 
> 
> Here is the text I suggest to capture the outcome of the discussion: 
> 
>Section 8.1 of [RFC7950] includes a provision for defining a
>constraint on state data and specifies that the constraint must be
>true in a valid state data.  However, Section 5.3 of [RFC8342] soften
>that behavior by allowing semantic constraints to be violated under
>some circumstances to help detecting anomalies.  Relaxing validation
>constraints on state data is meant to reveal deviations of the
>observed behavior vs. intended behavior of a managed entity and
>hopefully trigger corrective actions by a management system.  From
>that perspective, it is RECOMMENDED to avoid defining constraints on
>state data that would hinder the detection of abnormal behaviors of a
>managed entity.
> 
> Comments are still welcome.
> 
> You can also proposed change here: 
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fboucadair%2Frfc8407bis%2Fpull%2F24%2Ffiles=05%7C01%7Cjschoenwae%40constructor.university%7C26abf6cf21c74491173d08dbe6871eeb%7Cf78e973e5c0b4ab8bbd79887c95a8ebd%7C0%7C0%7C638357240241272993%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=js2FRW5aKEFjQCMqqOrM%2FjeRQ3hOu267C8hi6NkfGP4%3D=0
> 
> Thanks. 
> 
> Cheers,
> Med
> 
> > -Message d'origine-
> > De : netmod  De la part de Kent Watsen
> > Envoyé : mardi 7 novembre 2023 09:17
> > À : Jason Sterne (Nokia) 
> > Cc : Jürgen Schönwälder ;
> > netmod@ietf.org; Rob Wilton (rwilton)
> > 
> > Objet : Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-
> > message for "config false"
> > 
> > My confusion, sorry, I was thinking "mandatory".
> > 
> > Must statements on opstate are useful, but less important.
> > 
> > Kent
> > 
> > 
> > > On Nov 6, 2023, at 5:26 PM, Kent Watsen  wrote:
> > >
> > > "Must" statements on opstate usefully helps clients know when
> > certain values will always appear, enabling better optimization and
> > usability.
> > >
> > > E.g., for Syslog messages, there must always be a timestamp,
> > severity, and a message.  It would be unhelpful for the server to not
> > declare its intention to always send these fields.
> > >
> > > Kent
> > >
> > >
> > >> On Nov 6, 2023, at 10:49 AM, Jason Sterne (Nokia)
> >  wrote:
> > >>
> > >> +1 on what Jurgen and Rob are pointing out here.
> > >>
> > >> I'm not sure it makes a ton of sense to actually have a lot of
> > "must" statements in state models. We could consider discouraging
> > them?  (but we need to continue *allowing* them).
> > >>
> > >> Jason
> > >>
> > >>> -Original Message-
> > >>> From: netmod  On Behalf Of Rob Wilton
> > >>> (rwilton)
> > >>> Sent: Thursday, November 2, 2023 5:17 AM
> > >>> To: Jürgen Schönwälder ;
> > >>> mohamed.boucad...@orange.com
> > >>> Cc: netmod@ietf.org
> > >>> Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must +
> > >>> error-message for "config false"
> > >>>
> > >>>
> > >>> CAUTION: This is an external email. Please be very careful when
> > >>> clicking links or opening attachments. See the URL nok.it/ext for
> > >>> additional information.
> > >>>
> > >>>
> > >>>
> > >>> Specifically regarding MUST statements on state date, RFC 8342
> > >>> section 5.3, also has this statement (which effectively aligns to
> > Jürgen's last paragraph):
> > >>>
> > >>>   SHOULD conform to any constraints specified in the
> > >>> data  model, bu

Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config false"

2023-11-16 Thread mohamed . boucadair
Hi all, 

Thank you all for the feedback. 

Here is the text I suggest to capture the outcome of the discussion: 

   Section 8.1 of [RFC7950] includes a provision for defining a
   constraint on state data and specifies that the constraint must be
   true in a valid state data.  However, Section 5.3 of [RFC8342] soften
   that behavior by allowing semantic constraints to be violated under
   some circumstances to help detecting anomalies.  Relaxing validation
   constraints on state data is meant to reveal deviations of the
   observed behavior vs. intended behavior of a managed entity and
   hopefully trigger corrective actions by a management system.  From
   that perspective, it is RECOMMENDED to avoid defining constraints on
   state data that would hinder the detection of abnormal behaviors of a
   managed entity.

Comments are still welcome.

You can also proposed change here: 
https://github.com/boucadair/rfc8407bis/pull/24/files

Thanks. 

Cheers,
Med

> -Message d'origine-
> De : netmod  De la part de Kent Watsen
> Envoyé : mardi 7 novembre 2023 09:17
> À : Jason Sterne (Nokia) 
> Cc : Jürgen Schönwälder ;
> netmod@ietf.org; Rob Wilton (rwilton)
> 
> Objet : Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-
> message for "config false"
> 
> My confusion, sorry, I was thinking "mandatory".
> 
> Must statements on opstate are useful, but less important.
> 
> Kent
> 
> 
> > On Nov 6, 2023, at 5:26 PM, Kent Watsen  wrote:
> >
> > "Must" statements on opstate usefully helps clients know when
> certain values will always appear, enabling better optimization and
> usability.
> >
> > E.g., for Syslog messages, there must always be a timestamp,
> severity, and a message.  It would be unhelpful for the server to not
> declare its intention to always send these fields.
> >
> > Kent
> >
> >
> >> On Nov 6, 2023, at 10:49 AM, Jason Sterne (Nokia)
>  wrote:
> >>
> >> +1 on what Jurgen and Rob are pointing out here.
> >>
> >> I'm not sure it makes a ton of sense to actually have a lot of
> "must" statements in state models. We could consider discouraging
> them?  (but we need to continue *allowing* them).
> >>
> >> Jason
> >>
> >>> -----Original Message-
> >>> From: netmod  On Behalf Of Rob Wilton
> >>> (rwilton)
> >>> Sent: Thursday, November 2, 2023 5:17 AM
> >>> To: Jürgen Schönwälder ;
> >>> mohamed.boucad...@orange.com
> >>> Cc: netmod@ietf.org
> >>> Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must +
> >>> error-message for "config false"
> >>>
> >>>
> >>> CAUTION: This is an external email. Please be very careful when
> >>> clicking links or opening attachments. See the URL nok.it/ext for
> >>> additional information.
> >>>
> >>>
> >>>
> >>> Specifically regarding MUST statements on state date, RFC 8342
> >>> section 5.3, also has this statement (which effectively aligns to
> Jürgen's last paragraph):
> >>>
> >>>   SHOULD conform to any constraints specified in the
> >>> data  model, but given the principal aim of returning "in use"
> >>> values, it  is possible that constraints MAY be violated under
> some
> >>> circumstances  (e.g., an abnormal value is "in use", the structure
> >>> of a list is  being modified, or remnant configuration (see
> Section
> >>> 5.3.1) still  exists).  Note that deviations SHOULD be used when
> it
> >>> is known in  advance that a device does not fully conform to the
> >>>   schema.
> >>>
> >>>  Only semantic constraints MAY be violated.  These are the YANG
> >>> "when", "must", "mandatory", "unique", "min-elements", and
> >>> "max-elements" statements; and the uniqueness of key values.
> >>>
> >>>  Syntactic constraints MUST NOT be violated, including
> hierarchical
> >>> organization, identifiers, and type-based constraints.  If a node
> in
> >>>  does not meet the syntactic constraints, then it
> MUST
> >>> NOT be returned, and some other mechanism should be used to flag
> >>> the error.
> >>>
> >>> Regards,
> >>> Rob
> >>>
> >>>
> >>> -Original Message-
> >>> From: netmod  On Behalf Of Jürgen
> >>> Schönwälder
> >>> Sent: Wednesday,

Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config false"

2023-11-07 Thread Kent Watsen
My confusion, sorry, I was thinking “mandatory”.

Must statements on opstate are useful, but less important.

Kent


> On Nov 6, 2023, at 5:26 PM, Kent Watsen  wrote:
> 
> “Must” statements on opstate usefully helps clients know when certain values 
> will always appear, enabling better optimization and usability.
> 
> E.g., for Syslog messages, there must always be a timestamp, severity, and a 
> message.  It would be unhelpful for the server to not declare its intention 
> to always send these fields.
> 
> Kent
> 
> 
>> On Nov 6, 2023, at 10:49 AM, Jason Sterne (Nokia)  
>> wrote:
>> 
>> +1 on what Jurgen and Rob are pointing out here.
>> 
>> I'm not sure it makes a ton of sense to actually have a lot of "must" 
>> statements in state models. We could consider discouraging them?  (but we 
>> need to continue *allowing* them).
>> 
>> Jason
>> 
>>> -Original Message-
>>> From: netmod  On Behalf Of Rob Wilton
>>> (rwilton)
>>> Sent: Thursday, November 2, 2023 5:17 AM
>>> To: Jürgen Schönwälder ;
>>> mohamed.boucad...@orange.com
>>> Cc: netmod@ietf.org
>>> Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message
>>> for "config false"
>>> 
>>> 
>>> CAUTION: This is an external email. Please be very careful when clicking
>>> links or opening attachments. See the URL nok.it/ext for additional
>>> information.
>>> 
>>> 
>>> 
>>> Specifically regarding MUST statements on state date, RFC 8342 section 5.3,
>>> also has this statement (which effectively aligns to Jürgen's last 
>>> paragraph):
>>> 
>>>   SHOULD conform to any constraints specified in the data
>>>  model, but given the principal aim of returning "in use" values, it
>>>  is possible that constraints MAY be violated under some circumstances
>>>  (e.g., an abnormal value is "in use", the structure of a list is
>>>  being modified, or remnant configuration (see Section 5.3.1) still
>>>  exists).  Note that deviations SHOULD be used when it is known in
>>>  advance that a device does not fully conform to the 
>>>  schema.
>>> 
>>>  Only semantic constraints MAY be violated.  These are the YANG
>>>  "when", "must", "mandatory", "unique", "min-elements", and
>>>  "max-elements" statements; and the uniqueness of key values.
>>> 
>>>  Syntactic constraints MUST NOT be violated, including hierarchical
>>>  organization, identifiers, and type-based constraints.  If a node in
>>>   does not meet the syntactic constraints, then it
>>>  MUST NOT be returned, and some other mechanism should be used to
>>> flag
>>>  the error.
>>> 
>>> Regards,
>>> Rob
>>> 
>>> 
>>> -Original Message-
>>> From: netmod  On Behalf Of Jürgen
>>> Schönwälder
>>> Sent: Wednesday, November 1, 2023 7:46 AM
>>> To: mohamed.boucad...@orange.com
>>> Cc: netmod@ietf.org
>>> Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message
>>> for "config false"
>>> 
>>> Here is what RFC 7950 says:
>>> 
>>> 7.5.4.1.  The "error-message" Statement
>>> 
>>>The "error-message" statement, which is optional, takes a string as
>>>an argument.  If the constraint evaluates to "false", the string is
>>>passed as  in the  in NETCONF.
>>> 
>>> Since state data is not (directly) modified by processing RPCs, which
>>>  would carry the ? If the answer is 'none',
>>> then why define an  for state data?
>>> 
>>> My take has always been that operational state data should report as
>>> much as possible the true state of the device - even if the current
>>> state violates certain constraints. The entity to check constraints
>>> would be a managing system, not the managed system. That said, the
>>> wording in section 7.5.4.1 indicates that the designers had servers
>>> processing RPCs in mind.
>>> 
>>> /js
>>> 
>>> On Tue, Oct 31, 2023 at 10:40:15AM +,
>>> mohamed.boucad...@orange.com wrote:
>>>> Hi all,
>>>> 
>>>> In the context of 
>>>> https://datatracker.ietf.org/doc/dr

Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config false"

2023-11-06 Thread Jason Sterne (Nokia)
I can see how that could potentially be useful, but can a client really be 
written in a way that it is truly dependant on receiving those fields? I think 
maybe clients have to be able to handle not getting state fields.

What you're describing could also potentially be done using "mandatory true" 
although I'd wonder the same thing as for "must" statements. Having these types 
of constraints on the state model may be things the client can't necessarily 
code to anyways. For example: if a list entry had 5 state leafs and one was 
marked mandatory, then if for whatever reason the server couldn't return that 
leaf, should it not return the entire list entry?


> -Original Message-
> From: Kent Watsen 
> Sent: Monday, November 6, 2023 5:26 PM
> To: Jason Sterne (Nokia) 
> Cc: Rob Wilton (rwilton) ; Jürgen
> Schönwälder ;
> mohamed.boucad...@orange.com; netmod@ietf.org
> Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message
> for "config false"
> 
> 
> CAUTION: This is an external email. Please be very careful when clicking
> links or opening attachments. See the URL nok.it/ext for additional
> information.
> 
> 
> 
> “Must” statements on opstate usefully helps clients know when certain
> values will always appear, enabling better optimization and usability.
> 
> E.g., for Syslog messages, there must always be a timestamp, severity, and a
> message.  It would be unhelpful for the server to not declare its intention to
> always send these fields.
> 
> Kent
> 
> 
> > On Nov 6, 2023, at 10:49 AM, Jason Sterne (Nokia)
>  wrote:
> >
> > +1 on what Jurgen and Rob are pointing out here.
> >
> > I'm not sure it makes a ton of sense to actually have a lot of "must"
> statements in state models. We could consider discouraging them?  (but we
> need to continue *allowing* them).
> >
> > Jason
> >
> >> -Original Message-
> >> From: netmod  On Behalf Of Rob Wilton
> >> (rwilton)
> >> Sent: Thursday, November 2, 2023 5:17 AM
> >> To: Jürgen Schönwälder ;
> >> mohamed.boucad...@orange.com
> >> Cc: netmod@ietf.org
> >> Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-
> message
> >> for "config false"
> >>
> >>
> >> CAUTION: This is an external email. Please be very careful when clicking
> >> links or opening attachments. See the URL nok.it/ext for additional
> >> information.
> >>
> >>
> >>
> >> Specifically regarding MUST statements on state date, RFC 8342 section
> 5.3,
> >> also has this statement (which effectively aligns to Jürgen's last
> paragraph):
> >>
> >>SHOULD conform to any constraints specified in the data
> >>   model, but given the principal aim of returning "in use" values, it
> >>   is possible that constraints MAY be violated under some circumstances
> >>   (e.g., an abnormal value is "in use", the structure of a list is
> >>   being modified, or remnant configuration (see Section 5.3.1) still
> >>   exists).  Note that deviations SHOULD be used when it is known in
> >>   advance that a device does not fully conform to the 
> >>   schema.
> >>
> >>   Only semantic constraints MAY be violated.  These are the YANG
> >>   "when", "must", "mandatory", "unique", "min-elements", and
> >>   "max-elements" statements; and the uniqueness of key values.
> >>
> >>   Syntactic constraints MUST NOT be violated, including hierarchical
> >>   organization, identifiers, and type-based constraints.  If a node in
> >>does not meet the syntactic constraints, then it
> >>   MUST NOT be returned, and some other mechanism should be used to
> >> flag
> >>   the error.
> >>
> >> Regards,
> >> Rob
> >>
> >>
> >> -Original Message-
> >> From: netmod  On Behalf Of Jürgen
> >> Schönwälder
> >> Sent: Wednesday, November 1, 2023 7:46 AM
> >> To: mohamed.boucad...@orange.com
> >> Cc: netmod@ietf.org
> >> Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-
> message
> >> for "config false"
> >>
> >> Here is what RFC 7950 says:
> >>
> >>  7.5.4.1.  The "error-message" Statement
> >>
> >> The "error-message" statement, which is optional, takes a string as
> >> an argument.  If the constraint evaluates to "false", t

Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config false"

2023-11-06 Thread Kent Watsen
“Must” statements on opstate usefully helps clients know when certain values 
will always appear, enabling better optimization and usability.

E.g., for Syslog messages, there must always be a timestamp, severity, and a 
message.  It would be unhelpful for the server to not declare its intention to 
always send these fields.

Kent


> On Nov 6, 2023, at 10:49 AM, Jason Sterne (Nokia)  
> wrote:
> 
> +1 on what Jurgen and Rob are pointing out here.
> 
> I'm not sure it makes a ton of sense to actually have a lot of "must" 
> statements in state models. We could consider discouraging them?  (but we 
> need to continue *allowing* them).
> 
> Jason
> 
>> -Original Message-
>> From: netmod  On Behalf Of Rob Wilton
>> (rwilton)
>> Sent: Thursday, November 2, 2023 5:17 AM
>> To: Jürgen Schönwälder ;
>> mohamed.boucad...@orange.com
>> Cc: netmod@ietf.org
>> Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message
>> for "config false"
>> 
>> 
>> CAUTION: This is an external email. Please be very careful when clicking
>> links or opening attachments. See the URL nok.it/ext for additional
>> information.
>> 
>> 
>> 
>> Specifically regarding MUST statements on state date, RFC 8342 section 5.3,
>> also has this statement (which effectively aligns to Jürgen's last 
>> paragraph):
>> 
>>SHOULD conform to any constraints specified in the data
>>   model, but given the principal aim of returning "in use" values, it
>>   is possible that constraints MAY be violated under some circumstances
>>   (e.g., an abnormal value is "in use", the structure of a list is
>>   being modified, or remnant configuration (see Section 5.3.1) still
>>   exists).  Note that deviations SHOULD be used when it is known in
>>   advance that a device does not fully conform to the 
>>   schema.
>> 
>>   Only semantic constraints MAY be violated.  These are the YANG
>>   "when", "must", "mandatory", "unique", "min-elements", and
>>   "max-elements" statements; and the uniqueness of key values.
>> 
>>   Syntactic constraints MUST NOT be violated, including hierarchical
>>   organization, identifiers, and type-based constraints.  If a node in
>>does not meet the syntactic constraints, then it
>>   MUST NOT be returned, and some other mechanism should be used to
>> flag
>>   the error.
>> 
>> Regards,
>> Rob
>> 
>> 
>> -Original Message-
>> From: netmod  On Behalf Of Jürgen
>> Schönwälder
>> Sent: Wednesday, November 1, 2023 7:46 AM
>> To: mohamed.boucad...@orange.com
>> Cc: netmod@ietf.org
>> Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message
>> for "config false"
>> 
>> Here is what RFC 7950 says:
>> 
>>  7.5.4.1.  The "error-message" Statement
>> 
>> The "error-message" statement, which is optional, takes a string as
>> an argument.  If the constraint evaluates to "false", the string is
>> passed as  in the  in NETCONF.
>> 
>> Since state data is not (directly) modified by processing RPCs, which
>>  would carry the ? If the answer is 'none',
>> then why define an  for state data?
>> 
>> My take has always been that operational state data should report as
>> much as possible the true state of the device - even if the current
>> state violates certain constraints. The entity to check constraints
>> would be a managing system, not the managed system. That said, the
>> wording in section 7.5.4.1 indicates that the designers had servers
>> processing RPCs in mind.
>> 
>> /js
>> 
>> On Tue, Oct 31, 2023 at 10:40:15AM +,
>> mohamed.boucad...@orange.com wrote:
>>> Hi all,
>>> 
>>> In the context of 
>>> https://datatracker.ietf.org/doc/draft-ietf-pce-pcep-yang/,
>> Dhruv has received in the past a comment about the use of "must + error-
>> message" for "config false" data nodes. He reported that comment at
>> https://mailarchive.ietf.org/arch/msg/yang-
>> doctors/gWnXnyNHPVv_nZB1PQjThAwP1JY/, but without any follow-up.
>>> 
>>> rfc7950#section-8.1 includes a provision for the use of "must" for state
>> data, but silent about the use of error-message. Some guidance for authors
>> may be useful here.
>>> 
>>> The following options are being considered:
>>> 
>>> (1) Remove both must and error-message

Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config false"

2023-11-06 Thread Jason Sterne (Nokia)
+1 on what Jurgen and Rob are pointing out here.

I'm not sure it makes a ton of sense to actually have a lot of "must" 
statements in state models. We could consider discouraging them?  (but we need 
to continue *allowing* them).

Jason

> -Original Message-
> From: netmod  On Behalf Of Rob Wilton
> (rwilton)
> Sent: Thursday, November 2, 2023 5:17 AM
> To: Jürgen Schönwälder ;
> mohamed.boucad...@orange.com
> Cc: netmod@ietf.org
> Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message
> for "config false"
> 
> 
> CAUTION: This is an external email. Please be very careful when clicking
> links or opening attachments. See the URL nok.it/ext for additional
> information.
> 
> 
> 
> Specifically regarding MUST statements on state date, RFC 8342 section 5.3,
> also has this statement (which effectively aligns to Jürgen's last paragraph):
> 
> SHOULD conform to any constraints specified in the data
>model, but given the principal aim of returning "in use" values, it
>is possible that constraints MAY be violated under some circumstances
>(e.g., an abnormal value is "in use", the structure of a list is
>being modified, or remnant configuration (see Section 5.3.1) still
>exists).  Note that deviations SHOULD be used when it is known in
>advance that a device does not fully conform to the 
>schema.
> 
>Only semantic constraints MAY be violated.  These are the YANG
>"when", "must", "mandatory", "unique", "min-elements", and
>"max-elements" statements; and the uniqueness of key values.
> 
>Syntactic constraints MUST NOT be violated, including hierarchical
>organization, identifiers, and type-based constraints.  If a node in
> does not meet the syntactic constraints, then it
>MUST NOT be returned, and some other mechanism should be used to
> flag
>the error.
> 
> Regards,
> Rob
> 
> 
> -----Original Message-
> From: netmod  On Behalf Of Jürgen
> Schönwälder
> Sent: Wednesday, November 1, 2023 7:46 AM
> To: mohamed.boucad...@orange.com
> Cc: netmod@ietf.org
> Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message
> for "config false"
> 
> Here is what RFC 7950 says:
> 
>   7.5.4.1.  The "error-message" Statement
> 
>  The "error-message" statement, which is optional, takes a string as
>  an argument.  If the constraint evaluates to "false", the string is
>  passed as  in the  in NETCONF.
> 
> Since state data is not (directly) modified by processing RPCs, which
>  would carry the ? If the answer is 'none',
> then why define an  for state data?
> 
> My take has always been that operational state data should report as
> much as possible the true state of the device - even if the current
> state violates certain constraints. The entity to check constraints
> would be a managing system, not the managed system. That said, the
> wording in section 7.5.4.1 indicates that the designers had servers
> processing RPCs in mind.
> 
> /js
> 
> On Tue, Oct 31, 2023 at 10:40:15AM +,
> mohamed.boucad...@orange.com wrote:
> > Hi all,
> >
> > In the context of 
> > https://datatracker.ietf.org/doc/draft-ietf-pce-pcep-yang/,
> Dhruv has received in the past a comment about the use of "must + error-
> message" for "config false" data nodes. He reported that comment at
> https://mailarchive.ietf.org/arch/msg/yang-
> doctors/gWnXnyNHPVv_nZB1PQjThAwP1JY/, but without any follow-up.
> >
> > rfc7950#section-8.1 includes a provision for the use of "must" for state
> data, but silent about the use of error-message. Some guidance for authors
> may be useful here.
> >
> > The following options are being considered:
> >
> > (1) Remove both must and error-message for config false data nodes
> > (2) Remove error-message but keep the must
> > (3) keep both
> >
> > I think that (3) is OK as this is a formal way to detect anomalies in state
> data, but I'm open to hear what the WG thinks.
> >
> > Opinions whether we need to include a mention about this in draft-ietf-
> netmod-rfc8407bis are welcome.
> >
> > Thank you.
> >
> > Cheers,
> > Med
> >
> >
> __
> __
> > Ce message et ses pieces jointes peuvent contenir des informations
> confidentielles ou privilegiees et ne doivent donc
> > pas etre diffuses, exploites ou copies sans autorisation. Si vou

Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config false"

2023-11-02 Thread Rob Wilton (rwilton)
Specifically regarding MUST statements on state date, RFC 8342 section 5.3, 
also has this statement (which effectively aligns to Jürgen's last paragraph):

SHOULD conform to any constraints specified in the data
   model, but given the principal aim of returning "in use" values, it
   is possible that constraints MAY be violated under some circumstances
   (e.g., an abnormal value is "in use", the structure of a list is
   being modified, or remnant configuration (see Section 5.3.1) still
   exists).  Note that deviations SHOULD be used when it is known in
   advance that a device does not fully conform to the 
   schema.

   Only semantic constraints MAY be violated.  These are the YANG
   "when", "must", "mandatory", "unique", "min-elements", and
   "max-elements" statements; and the uniqueness of key values.
 
   Syntactic constraints MUST NOT be violated, including hierarchical
   organization, identifiers, and type-based constraints.  If a node in
does not meet the syntactic constraints, then it
   MUST NOT be returned, and some other mechanism should be used to flag
   the error.

Regards,
Rob


-Original Message-
From: netmod  On Behalf Of Jürgen Schönwälder
Sent: Wednesday, November 1, 2023 7:46 AM
To: mohamed.boucad...@orange.com
Cc: netmod@ietf.org
Subject: Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for 
"config false"

Here is what RFC 7950 says:

  7.5.4.1.  The "error-message" Statement

 The "error-message" statement, which is optional, takes a string as
 an argument.  If the constraint evaluates to "false", the string is
 passed as  in the  in NETCONF.

Since state data is not (directly) modified by processing RPCs, which
 would carry the ? If the answer is 'none',
then why define an  for state data?

My take has always been that operational state data should report as
much as possible the true state of the device - even if the current
state violates certain constraints. The entity to check constraints
would be a managing system, not the managed system. That said, the
wording in section 7.5.4.1 indicates that the designers had servers
processing RPCs in mind.

/js

On Tue, Oct 31, 2023 at 10:40:15AM +, mohamed.boucad...@orange.com wrote:
> Hi all,
> 
> In the context of https://datatracker.ietf.org/doc/draft-ietf-pce-pcep-yang/, 
> Dhruv has received in the past a comment about the use of "must + 
> error-message" for "config false" data nodes. He reported that comment at 
> https://mailarchive.ietf.org/arch/msg/yang-doctors/gWnXnyNHPVv_nZB1PQjThAwP1JY/,
>  but without any follow-up.
> 
> rfc7950#section-8.1 includes a provision for the use of "must" for state 
> data, but silent about the use of error-message. Some guidance for authors 
> may be useful here.
> 
> The following options are being considered:
> 
> (1) Remove both must and error-message for config false data nodes
> (2) Remove error-message but keep the must
> (3) keep both
> 
> I think that (3) is OK as this is a formal way to detect anomalies in state 
> data, but I'm open to hear what the WG thinks.
> 
> Opinions whether we need to include a mention about this in 
> draft-ietf-netmod-rfc8407bis are welcome.
> 
> Thank you.
> 
> Cheers,
> Med
> 
> 
> Ce message et ses pieces jointes peuvent contenir des informations 
> confidentielles ou privilegiees et ne doivent donc
> pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu 
> ce message par erreur, veuillez le signaler
> a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
> electroniques etant susceptibles d'alteration,
> Orange decline toute responsabilite si ce message a ete altere, deforme ou 
> falsifie. Merci.
> 
> This message and its attachments may contain confidential or privileged 
> information that may be protected by law;
> they should not be distributed, used or copied without authorisation.
> If you have received this email in error, please notify the sender and delete 
> this message and its attachments.
> As emails may be altered, Orange is not liable for messages that have been 
> modified, changed or falsified.
> Thank you.

> ___
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod


-- 
Jürgen Schönwälder  Constructor University Bremen gGmbH
Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103 <https://constructor.university/>

___
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


Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config false"

2023-11-01 Thread Jürgen Schönwälder
Here is what RFC 7950 says:

  7.5.4.1.  The "error-message" Statement

 The "error-message" statement, which is optional, takes a string as
 an argument.  If the constraint evaluates to "false", the string is
 passed as  in the  in NETCONF.

Since state data is not (directly) modified by processing RPCs, which
 would carry the ? If the answer is 'none',
then why define an  for state data?

My take has always been that operational state data should report as
much as possible the true state of the device - even if the current
state violates certain constraints. The entity to check constraints
would be a managing system, not the managed system. That said, the
wording in section 7.5.4.1 indicates that the designers had servers
processing RPCs in mind.

/js

On Tue, Oct 31, 2023 at 10:40:15AM +, mohamed.boucad...@orange.com wrote:
> Hi all,
> 
> In the context of https://datatracker.ietf.org/doc/draft-ietf-pce-pcep-yang/, 
> Dhruv has received in the past a comment about the use of "must + 
> error-message" for "config false" data nodes. He reported that comment at 
> https://mailarchive.ietf.org/arch/msg/yang-doctors/gWnXnyNHPVv_nZB1PQjThAwP1JY/,
>  but without any follow-up.
> 
> rfc7950#section-8.1 includes a provision for the use of "must" for state 
> data, but silent about the use of error-message. Some guidance for authors 
> may be useful here.
> 
> The following options are being considered:
> 
> (1) Remove both must and error-message for config false data nodes
> (2) Remove error-message but keep the must
> (3) keep both
> 
> I think that (3) is OK as this is a formal way to detect anomalies in state 
> data, but I'm open to hear what the WG thinks.
> 
> Opinions whether we need to include a mention about this in 
> draft-ietf-netmod-rfc8407bis are welcome.
> 
> Thank you.
> 
> Cheers,
> Med
> 
> 
> Ce message et ses pieces jointes peuvent contenir des informations 
> confidentielles ou privilegiees et ne doivent donc
> pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu 
> ce message par erreur, veuillez le signaler
> a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
> electroniques etant susceptibles d'alteration,
> Orange decline toute responsabilite si ce message a ete altere, deforme ou 
> falsifie. Merci.
> 
> This message and its attachments may contain confidential or privileged 
> information that may be protected by law;
> they should not be distributed, used or copied without authorisation.
> If you have received this email in error, please notify the sender and delete 
> this message and its attachments.
> As emails may be altered, Orange is not liable for messages that have been 
> modified, changed or falsified.
> Thank you.

> ___
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod


-- 
Jürgen Schönwälder  Constructor University Bremen gGmbH
Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103 

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config false"

2023-11-01 Thread Qin Wu
I think the use “must” for state data makes sense, the logic in my 
understanding, is  the state data can not be modified by the management system, 
if we allow error-message to be sent to the management system,
It doesn’t help for the management system since the management is not allowed 
to modify the state data. For error related to state data, it is the 
responsibility of the developer to make sure the constraint should
be set to TRUE always or it is responsibility of network device to fix this.

Based on the above logic,  I think keep must make sense.

-Qin
发件人: netmod [mailto:netmod-boun...@ietf.org] 代表 mohamed.boucad...@orange.com
发送时间: 2023年10月31日 18:40
收件人: netmod@ietf.org
主题: [netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config 
false"

Hi all,

In the context of https://datatracker.ietf.org/doc/draft-ietf-pce-pcep-yang/, 
Dhruv has received in the past a comment about the use of “must + 
error-message” for “config false” data nodes. He reported that comment at 
https://mailarchive.ietf.org/arch/msg/yang-doctors/gWnXnyNHPVv_nZB1PQjThAwP1JY/,
 but without any follow-up.

rfc7950#section-8.1 includes a provision for the use of “must” for state data, 
but silent about the use of error-message. Some guidance for authors may be 
useful here.

The following options are being considered:

(1) Remove both must and error-message for config false data nodes
(2) Remove error-message but keep the must
(3) keep both

I think that (3) is OK as this is a formal way to detect anomalies in state 
data, but I’m open to hear what the WG thinks.

Opinions whether we need to include a mention about this in 
draft-ietf-netmod-rfc8407bis are welcome.

Thank you.

Cheers,
Med




Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc

pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler

a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,

Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.



This message and its attachments may contain confidential or privileged 
information that may be protected by law;

they should not be distributed, used or copied without authorisation.

If you have received this email in error, please notify the sender and delete 
this message and its attachments.

As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.

Thank you.
___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


[netmod] draft-ietf-netmod-rfc8407bis: must + error-message for "config false"

2023-10-31 Thread mohamed . boucadair
Hi all,

In the context of https://datatracker.ietf.org/doc/draft-ietf-pce-pcep-yang/, 
Dhruv has received in the past a comment about the use of "must + 
error-message" for "config false" data nodes. He reported that comment at 
https://mailarchive.ietf.org/arch/msg/yang-doctors/gWnXnyNHPVv_nZB1PQjThAwP1JY/,
 but without any follow-up.

rfc7950#section-8.1 includes a provision for the use of "must" for state data, 
but silent about the use of error-message. Some guidance for authors may be 
useful here.

The following options are being considered:

(1) Remove both must and error-message for config false data nodes
(2) Remove error-message but keep the must
(3) keep both

I think that (3) is OK as this is a formal way to detect anomalies in state 
data, but I'm open to hear what the WG thinks.

Opinions whether we need to include a mention about this in 
draft-ietf-netmod-rfc8407bis are welcome.

Thank you.

Cheers,
Med


Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.
___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod