Hi,

pyang has "deref()" support for YANG version 1 (RFC 6020), which is non-standard. This option already existed before YANG version 1.1 (RFC 7950) and makes pyang RFC 6020 compliant.

A quick search of the code base at master Git branch suggests "strict" is used only when checking "deref()" inside YANG version 1 modules ("pyang/xpath.py", lines 165 - 168 [1]).

The text:

"Currently this checks that the deref() function is not used in XPath expressions and leafrefs."

is somewhat misleading, because it is always an error to use "deref()" in a "path" expression, which pyang properly reports as a syntax error, regardless of this option's presence (at least the version I have access to does).

[1] https://github.com/mbj4668/pyang/blob/167bcda44556fc5285c782b0a4e3452f6d5b0bf8/pyang/xpath.py#L165

Jernej

On 25/04/2025 10:36, Balázs Lengyel wrote:

Hello,

The pyang man contains the following:

--strict

   Force strict YANG compliance.

   Currently this checks that the deref() function is not used in XPath expressions and leafrefs.

Why is deref() singled out? It is a standard part of YANG 1.1. RFC7950. Why  would it not be strictly YANG compliant?

Does the –strict option check anything else beyond deref()

Any help appreciated. Regards Balazs


_______________________________________________
netmod mailing list [email protected]
To unsubscribe send an email [email protected]
_______________________________________________
netmod mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to