Thanks Med - I modified the description to include the constraints. For example:
leaf algo-number {
type uint8;
description
- "Flex-algo number, value between 128 and 255 inclusive.";
+ "Flex-algo number - A value not in the inclusive range
+ of 128-255 is an invalid FAD TLV specification.";
}
Acee
> On Mar 30, 2026, at 2:03 AM, [email protected] wrote:
>
> Hi Acee,
>
> This is covered in 9907:
>
> Section 8.1 of [RFC7950] includes provisions for defining constraints
> on state data and specifies that a constraint must be true in a valid
> state data tree. However, Section 5.3 of [RFC8342] softens that
> behavior by allowing semantic constraints to be violated under some
> circumstances to help to detect anomalies. Relaxing validation
> constraints on state data is meant to reveal deviations of the
> observed behavior versus 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 by a management system of
> abnormal behaviors of a managed entity.
>
> You can use the description clause to describe the nominal behavior.
> Deviation from it will be an indication of abnormal behavior that, when
> reported, would help trigger corrective actions from an operator.
>
> Cheers,
> Med
>
>> -----Message d'origine-----
>> De : Acee Lindem <[email protected]>
>> Envoyé : samedi 28 mars 2026 20:43
>> À : NetMod WG <[email protected]>; YANG Doctors <yang-
>> [email protected]>
>> Objet : [netmod] YANG Read-Only Data Nodes
>>
>>
>> I know we've discussed this before, but it is not covered in
>> https://fra01.safelinks.protection.outlook.com/?url=https%3A%2F%2F
>> datatracker.ietf.org%2Fdoc%2Frfc9907%2F&data=05%7C02%7Cmohamed.bou
>> cadair%40orange.com%7C8e3ea415831347f8839908de8d024091%7C90c7a20af
>> 34b40bfbc48b9253b6f5d20%7C0%7C0%7C639103237979762490%7CUnknown%7CT
>> WFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4
>> zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=k%2F9jm06
>> zvCTvK7H6EHT5AxVgp57DW8c7a0QY0UiBlCc%3D&reserved=0
>>
>> For read-only data nodes that have more restrictive types (e.g., a
>> range), should these ranges be reflected in the read-only nodes?
>>
>> We'd still want to provide visibility to the data nodes even if
>> this didn't conform to the type restrictions (e.g., range or
>> enum).
>> For example, operational state containing a protocol packet field
>> with a value that falls outside the allowed range received from a
>> peer.
>>
>> Should this be done with a union with the semantically correct
>> type as the first choice?
>>
>> This is a recurring theme in YANG model reviews...
>>
>> Thanks,
>> Acee
>>
>>
>> _______________________________________________
>> netmod mailing list -- [email protected]
>> To unsubscribe send an email to [email protected]
> ____________________________________________________________________________________________________________
> 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 -- [email protected]
To unsubscribe send an email to [email protected]