There can be duplicates, unless a list's "unique" statement says otherwise.

K.


> On Jun 16, 2026, at 7:34 AM, Vojtech Vilimek 
> <[email protected]> wrote:
> 
> Hi netmod,
> 
> The RFC7950 YANG 1.1, section 7.8 'The "list" statement' states
> clearly that entries of lists with keys must be unique. Can a keyless
> list have duplicate entries?
> 
> (This is possible only in operational state.)
> The operational state leaf-lists can have duplicates.
> 
> 
> From RFC8791, section 4 YANG Module, description of sx:structure
> extension statement:
> |  The following data-def-stmt substatements are constrained
> |  when used within a 'structure' extension statement.
> |
> |    - The list-stmt is not required to have a key-stmt defined.
> |    - The config-stmt is ignored if present.
> 
> Are keyless lists inside the YANG Structure context allowed to have
> duplicates?
> 
> Best regards,
> Vojtech Vilimek
> CZ.NIC z. s. p. o.
> 
> _______________________________________________
> 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