[YANGTOOLS-832] Add instance-identifier and leaf-reference native types Created: 14/Nov/17  Updated: 10/Apr/22  Resolved: 26/Oct/21

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

Type: New Feature Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates YANGTOOLS-1356 Introduce model.api.stmt.DataNodeIden... Resolved

 Description   

We need a bridge between yang-model-api and yang-data-api where types are concerned. Specifically, we need to map TypeDefinitiion.getDefaultValue() to native types, as expected by yang-data-api.

We can generalize YangInstanceIdentifier, but its deficiencies must be fixed first:

  • augmentation cross-over happens on namespace change, without an explicit node, e.g. AugmentationIdentifier is actually QNameNamespace different from parent
  • ability to target via list order, for user ordered lists and leaf-lists
  • it really needs to align to the XPath view of yang-modeled data

More impact/tradeoff analysis is required.



 Comments   
Comment by Robert Varga [ 27/Aug/18 ]

With YANGTOOLS-585 out of the way, we really do not need AugmentationIdentifier. We can provide QNameModule query in yang-data-api to allow remote filtering based on namespace.

Comment by Robert Varga [ 26/Oct/21 ]

While this issue is older, YANGTOOLS-1356 provides a targeted solution based on what our downstreams need.

DataNodeIdentifier solves the instance-identifier part, as it has exactly the same semantics as we need – it operates on data tree addressing and is the counterpart to SchemaNodeIdentifier. YANG parser understands both schema and data trees, hence it will have little trouble with it.

DataNodeFilter solves the leaf-reference part, as it is a superset of leaf-reference can address without bringing any of the XPath complexities to the table.

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