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