Hi,

an "sx:structure" instance that contains non-unique values in a "leaf-list" is valid, since such an instance does not represent configuration data, per RFC 8791 (and RFC 7950).

module d {
  yang-version 1.1;
  namespace "d:uri";
  prefix "d";

  import ietf-yang-structure-ext {
    prefix sx;
  }

  sx:structure example {
    leaf-list entry {
      type uint8;
    }
  }
}

<example xmlns="d:uri">
  <entry>1</entry>
  <entry>1</entry>
  <entry>1</entry>
</example>

In other words, the above XML instance is valid per provided example YANG module. Uniqueness would need to be enforced via "must" statements.

Is this interpretation of the RFCs correct?

Jernej

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to