On Mon, Aug 18, 2025 at 11:02 PM Michal Vasko <mvasko=
[email protected]> wrote:

> Hi Andy,
>
> I do not fully agree with your interpretation but the situation is
> generally more complicated, I think. As for the operational datastore and
> its validity, the NMDA RFC
> <https://www.rfc-editor.org/rfc/rfc8342.html#page-15> does not say it
> does not have to be valid or that it is not validated. It only mentions
> that some constraints (`mandatory` among them) can be temporarily violated.
> I believe that is perhaps subtle but important difference.
>
> However, none of this is even relevant for the issues discussed. Libyang
> (or `yanglint`) has no actual concept of datastores, which is left for
> applications linking this library. But it should support all the common
> use-cases including this special operational datastore validation when
> semantic constraints are not validated (but it seems this is not available
> in `yanglint`, only in the library). Finally, I think the main question is
> for Reshad and what exactly was he trying to check. The command he used is
> for full validation of both configuration and state data and that was
> performed correctly, I think.
>


       A mandatory database data definition is defined as a node that a
client must provide for the database to be valid. The server is not
required to provide a value.

What is the exact guideline that yanglint is enforcing?
This section does not apply, as it only refers to client-provided values,
which are never config=false nodes.

Regards,
> Michal
>

Andy


> On 18. 8. 2025 20:11, Andy Bierman wrote:
>
>
>
> On Fri, Aug 15, 2025 at 1:10 PM Andy Bierman <[email protected]> wrote:
>
>>
>>
>> On Fri, Aug 15, 2025 at 12:38 PM Reshad Rahman <reshad=
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> Using yanglint, when I try to validate the example in Appendix C of
>>> RFC8525, I get the following error:
>>>
>>> > data /home/xyz/YANG/example-yang-library.xml
>>>
>>> libyang[0]: Mandatory node "module-set-id" instance does not exist.
>>> (path: Data location "/ietf-yang-library:modules-state".)
>>>
>>> YANGLINT[E]: Failed to parse input data file
>>> "/home/xyz/YANG/example-yang-library.xml".
>>> >
>>>
>>> My understanding is that yanglint is behaving correctly (no
>>> presence-stmt in the modules-state container), but would like confirmation.
>>>
>>> If yes, is that worth an errata on RFC8525?
>>>
>>>
>> This may violate a guideline in RFC8407bis, but nothing in RFC 7950.
>>
>
>
> I do not think yanglint is correct. This warning should only be for
> config=true data nodes.
>
>
> https://www.ietf.org/archive/id/draft-ietf-netmod-rfc8407bis-28.html#section-4.10
>
> The guideline is for top-level "database" data nodes.
> The term should really be "datastore", and config=false nodes are only
> part of <operational>, which is not subject to validation.
>
> Andy
>
>
> In practice, the server creates its own config=false data at boot-time, so
>> the constraint is not actually violated.
>> Mandatory=true for config=false is not validated on the server.
>> It means the node is expected in a response from the server requesting
>> this data.
>> It is validated by the client.
>>
>>
>>
>>> Regards,
>>> Reshad.
>>>
>>>
>> Andy
>>
>>
>>>   container modules-state {
>>>
>>>        config false;
>>>        status deprecated;
>>>        description
>>>          "Contains YANG module monitoring information.";
>>>        leaf module-set-id {
>>>          type string;
>>>          mandatory true;
>>>          status deprecated;
>>>          description
>>>            "Contains a server-specific identifier representing
>>>             the current set of modules and submodules.  The
>>>             server MUST change the value of this leaf if the
>>>             information represented by the 'module' list instances
>>>             has changed.";
>>>        }
>>>        uses module-list {
>>>          status deprecated;
>>>        }
>>>      }
>>>
>>> _______________________________________________
>>> netmod mailing list -- [email protected]
>>> To unsubscribe send an email to [email protected]
>>>
>>
> _______________________________________________
> netmod mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>
> _______________________________________________
> netmod mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>
_______________________________________________
netmod mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to