[YANGTOOLS-173] Usability: Rename the yang.data.api.InstanceIdentifier to yang.data.api.YangInstanceIdentifier Created: 28/May/14  Updated: 10/Apr/22  Resolved: 30/Jul/14

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Devin Avery Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC



 Description   

One of the comments on usability of MD-SAL is that classes with the same name make it really difficult to use and interact with MD-SAL.

On that front, we would like to rename the InstanceIdentifier class name, for which there are two classes (a binding aware and binding independent version).

org.opendaylight.yangtools.yang.data.api.InstanceIdentifier to org.opendaylight.yangtools.yang.data.api.BIInstanceIdentifier

and

org.opendaylight.yangtools.yang.binding.InstanceIdentifier to
org.opendaylight.yangtools.yang.binding.BAInstanceIdentifier

By renaming these classes we can make it clearer if we are using the BI or BA version, and it will also allow them to coexist in the same class with out having to fully qualify the class names.



 Comments   
Comment by Tony Tkacik [ 04/Jun/14 ]

This changes a lot of APIs, this needs to be taken care of carefully.

Comment by Devin Avery [ 04/Jun/14 ]

Tony - what if we derive two new classes from each with the below suggested names, and @Deprecate the old ones. That way folks can start using the new syntax, but we don't have to change any API.

After projects start to migrate we can do a final push to move all remaining code.

This way it would be less of a "shock" to the system and should keep everything compiling even though the API changes.

Additionally, this would allow instanceof calls etc to still work. So as long as we are not check explict class types anywhere we should be safe.

Comment by Tony Tkacik [ 04/Jun/14 ]

Hi Devin, could you propose patch for this (leave existing,
create subclasses with new names)

I would suggest naming:
BindingInstanceIdentifier - for yang-binding version
DOMInstanceIdentifier - for yang-data-api version

These names are more self-explaining as BI/BA versions.

Comment by Robert Varga [ 29/Jul/14 ]

https://git.opendaylight.org/gerrit/#/c/9427/
https://git.opendaylight.org/gerrit/#/c/9428/

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