[YANGTOOLS-1412] Add DataSchemaContextTree/SchemaInferenceStack integration Created: 23/Mar/22  Updated: 24/Mar/22  Resolved: 24/Mar/22

Status: Resolved
Project: yangtools
Component/s: data-util
Affects Version/s: 8.0.0, 8.0.1
Fix Version/s: 7.0.15, 8.0.2

Type: Bug Priority: Highest
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks NETCONF-818 Eliminate use of SchemaNode.getPath()... Resolved

 Description   

The removal of SchemaNode.getPath() leaves a nasty gap in our integration with yang.data.api: there is no alternative to initialize a SchemaInferenceStack when have a YangInstanceIdentifier. DataSchemaContextTree can be used to locate the corresponding DataSchemaNode, but there is not sufficient information exposed to tie that lookup to a SchemaNodeIdentifier.Absolute path.

There is a secondary issue, which directly impacts NETCONF-818, which is that there is no avenue to build up a YangInstanceIdentifier and also build up the corresponding SchemaInferenceStack state.

Both of these facilities are available indirectly by means of DataSchemaContextNode.getDataSchemaNode().getPath() – an avenue not available since 8.0.0.

Provide extend DataSchemaContextNode to provide

DataSchemaContextNode<?> enterChild(SchemaInferenceStack stack, PathArgument child);

DataSchemaContextNode<?> enterChild(SchemaInferenceStack stack, QName child);

both of which work just as getChild(), except it also push the appropriate instruction into provided stack.

Also provide a DataSchemaContextTree.enterPath(YangInstanceIdentifier), which will provide a both a context node and an initialized SchemaInferenceStack.


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