openconfig / public

Repository for publishing OpenConfig models, documentation, and other material for the community.
Apache License 2.0
895 stars 655 forks source link

No validation needed for `leafref { path "../config/name"; }`? #1051

Closed qm2k closed 1 month ago

qm2k commented 8 months ago

Some clarification is needed on how PR #543 applies to the following ubiquitous idiom:

leaf name {
  type leafref {
    path "../config/name";
  }
  description
    "Reference to list key";
}

Is each definition of this kind going to be marked require-instance true? Or are we allowing creation of elements with different values of name and config/name?

PR seems to be aware of this use case, since it lists it first in the "Why use a leafref?" section and notes that only the third item in the list "requires additional consideration". Section "Relaxed Leafref Validation Requirements" however does not make this distinction, saying that a server "SHOULD NOT validate the existence of the leaf that is pointed to by the leafref path" unless require-instance true is specified.

Cf. #773

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 180 days with no activity. If you wish to keep this issue active, please remove the stale label or add a comment, otherwise will be closed in 14 days.