[YANGTOOLS-1012] Improve RFC8528/RFC8525 parsing interoperability Created: 25/Jul/19  Updated: 05/Jan/24

Status: Confirmed
Project: yangtools
Component/s: codecs
Affects Version/s: None
Fix Version/s: 14.0.0

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MDSAL-463 Add yanglib-rfc8525 Resolved
relates to NETCONF-782 RestconfDocumentedExceptionMapper una... Resolved
relates to MDSAL-460 Define a replacement for LogicalDatas... Confirmed

 Description   

In order to make an accurate selection of mount point schema context from embedded YANG Library data, we need to understand which data store the parsing request is related to.

This information needs to be specified to the parser by the user and needs to be passed down to MountPointContextFactory so that an appropriate selection can be made.

This will certainly complicate the APIs involved and will probably end up being non-compatible, but it is quite necessary – otherwise generic library support, like mdsal-yanglib-rfc8525 is left guessing as to which model to select.

 



 Comments   
Comment by Robert Varga [ 25/Jul/19 ]

I think this boils down to creating a

public interface DatastoreContext extends Identifiable<DatastoreIdentifier>, SchemaContextProvider;

which really is very similar to current MountPointContext, except it is not burdened with MountPointIdentifier (which is not really needed in the codec paths).

This will also allow us bits and pieces of datastore – for example the ability to record a DataTreeSnapshot, which is needed to parse constructs like:

leaf foo {
    type union {
        // references a data tree instance
        type leafref;
        type string;
    }
}

Since parsers are required to normalize the union, they decide whether it matches the leafref before they fall back to string. In order to do that, they need access to a data tree instance on which to evaluate the leafref expression...

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