[YANGTOOLS-364] Milestone: Computation of referential integrity context Created: 12/Nov/14  Updated: 10/Apr/22  Due: 16/Apr/15  Resolved: 24/Apr/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-341 Data Tree: Add leafref validation sup... Resolved
blocks YANGTOOLS-391 Milestone: Release YANGTools Lithium Resolved

 Description   

Dynamic sharding and enforcement of validation of leafrefs requires easily processable
referential intergrity context, which captures relationship between schema subtrees
which are related by leafrefs (referenced subtree and referencing subtree).



 Comments   
Comment by Tony Tkacik [ 12/Nov/14 ]

Lithium M3 Offset 0 - 1 week - Yangtools need to be prepared before Controller project.

Comment by Peter Kajsa [ 12/Feb/15 ]

Beta version draft of LeafRefContext tree computation is here:
https://git.opendaylight.org/gerrit/#/c/14891/

I appreciate any feedback.

Currently works:

  • 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 known issues:

  • 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
Comment by Peter Kajsa [ 20/Feb/15 ]

New patch set version: 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
Generated at Wed Feb 07 20:53:00 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.