Details
-
Improvement
-
Status: Confirmed
-
Medium
-
Resolution: Unresolved
-
None
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:
- InstanceIdentifier, covering the yang.binding.InstanceIdentifier wildcarded=false case
- InstanceWildcard, covering the yang.binding.InstanceIdentifier wildcarded=true case
These should work similarly to InstanceIdentifierBuilder as of MDSAL-798.
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();
}
Attachments
Issue Links
Gerrit Reviews
| # | Subject | Branch | Project | Status | CR | V |
|---|---|---|---|---|---|---|
| 104772,25 | WIP: Add binding.api.(Keyed)Instance{Identifier,Wildcard} | master | mdsal | Status: NEW | -1 | -1 |
| 109700,2 | WIP: Add DataObjectInstance | master | mdsal | Status: NEW | 0 | -1 |
| 109753,10 | Eliminate CodecItemFactory | master | mdsal | Status: NEW | 0 | +1 |
| 104964,1 | WIP: Extend Read,write operations, DataTreeChangeService to consume new InstanceIdentifer | master | mdsal | Status: ABANDONED | 0 | -1 |
| 109692,21 | Refactor PathArgument to DataObjectStep | master | mdsal | Status: MERGED | +2 | +1 |
| 109742,3 | Hide CodecContextSupplier | master | mdsal | Status: MERGED | +2 | +1 |
| 109745,1 | Separate out DataContainerPrototype | master | mdsal | Status: MERGED | +2 | +1 |
| 109746,2 | Loosen BindingDataContainerCodecTreeNode.getBindingClass() | master | mdsal | Status: MERGED | +2 | +1 |
| 109748,2 | Retain protype in DataContainerCodecContext | master | mdsal | Status: MERGED | +2 | +1 |
| 109749,6 | Reparent ChoiceCodecContext | master | mdsal | Status: MERGED | +2 | +1 |
| 109750,11 | Make AugmentationCodecPrototype generic | master | mdsal | Status: MERGED | +2 | +1 |
| 109756,8 | Hide CodecContext methods | master | mdsal | Status: MERGED | +2 | +1 |
| 109781,2 | Clean up AugmentationCodecContext | master | mdsal | Status: MERGED | +2 | +1 |
| 109785,1 | Report ExactDataObjectStep from DataObjectModification | master | mdsal | Status: MERGED | +2 | +1 |