[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: |
|
||||||||
| 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 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. |