[YANGTOOLS-341] Data Tree: Add leafref validation support Created: 16/Oct/14  Updated: 10/Apr/22  Resolved: 26/May/15

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Tony Tkacik Assignee: Peter Kajsa
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks YANGTOOLS-363 Milestone: Basic constraints validation Resolved
is blocked by YANGTOOLS-364 Milestone: Computation of referential... Resolved

 Description   

DataTree should be able to verify correctness of leafreferences
and fail validation if leaf references incorrect data.



 Comments   
Comment by Reinaldo Penno [ 06/Nov/14 ]

Hi Folks,

any update on this?

thanks,

Comment by Peter Kajsa [ 20/Feb/15 ]

Patch set: https://git.opendaylight.org/gerrit/#/c/14891/

I appreciate any feedback.

YANGTOOLS-364 YANGTOOLS-341. Beta version of LeafRefContext tree computation, beta
version of DataTree leafrefs values validation

Currently works (YANGTOOLS-364):

  • LeafRefContext tree build with all relations:
  • isReferencing/ hasReferencingChild
  • isReferencedBy/ hasReferencedByChild
  • leafref target node -> leafref source nodes
  • validation of LeafRef Path and Predicates syntax according to RFC6020
    specification
  • parsing of all LeafRef Path components (i.e.: LeafRef absolute/relative
    target path, path Predicates, key path expressions) into LeafRefPath
    instance
  • pack of utils methods over LeafRefContext tree
  • a couple of simple tests

Currently works (YANGTOOLS-341):

  • validation of LeafRefs values and LeafRefs targets for WRITE, MERGE and
    DELETE operations

Currently known issues (YANGTOOLS-364):

  • improve leafref identification, also for cases when type of the leaf is
    typedef -> typedef -> etc.. -> leafref
  • handle also choices without case
  • questionable issue is, whether it is necessary to merge referencing and
    referencedBy subtrees under the root context (currently are not)
  • in equals method check also for predicates equality
  • add util methods for predicates evaluations
  • test the solution

Currently known issues (YANGTOOLS-341):

  • evaluate also Predicates in LeafRef path
  • handle also special types of nodes
  • perfrom further testing
  • increase unit tests coverage
  • add tests for special cases
Comment by Reinaldo Penno [ 20/Feb/15 ]

I can not access the patch you reference. "The page you requested was not found"

Generated at Wed Feb 07 20:52:56 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.