[MDSAL-815] Add binding.api.(Keyed)Instance{Identifier,Wildcard} Created: 24/Feb/23 Updated: 18/Jan/24 |
|
| Status: | Confirmed |
| Project: | mdsal |
| Component/s: | Binding API |
| Affects Version/s: | None |
| Fix Version/s: | 14.0.0, 13.0.1 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Our current use of yang.binding.InstanceIdentifier in mdsal-binding-api is rather unfortunate - with accidental feature (i.e. wildcards) and layering violation. Add two basic concepts:
These should work similarly to InstanceIdentifierBuilder as of Compatibility to/from yang.binding.InstanceIdentifier should be covered with methods for each of the concepts: class InstanceIdentifier {
// Throws IAE if legacy is wildcarded
static InstanceIdentifier ofLegacy(yang.binding.InstanceIdentifier legacy);
// Always non-wildcarded
yang.binding.InstanceIdentifier toLegacy();
}
class InstanceWildcard {
// Throws IAE if legacy is *not* wildcarded
static InstanceWildcard ofLegacy(yang.binding.InstanceIdentifier legacy);
// Always wildcarded
yang.binding.InstanceIdentifier toLegacy();
}
|