Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

0

How to convert from a BA to a BI instance identifier, and back again

asked 2014-05-21 11:27:47 -0800

Devin Avery gravatar image

While implementing DataChangeListeners, DataReaders, RpcImplemntations etc there is a lot of conversation between BA and BI instance identifiers, path arguments etc. I am looking for the proper way to convert between the two java types so we can satisfy the interfaces.

If you check out the example code on this gerrit ( https://git.opendaylight.org/gerrit/#/c/7249/ ) and look at the DeviceMountHandler#mountIcmpDataNode() method and PingableDeviceHandler consutrctor you will see the various ways we have to manually create these various types of instance identifiers. Unfortunately in the data change listener interface, when we are notified of a change, we are given one type and we need to convert it to the other types.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-05-21 12:36:04 -0800

Tony Tkacik gravatar image

From OSGI service registry you could obtain instance of BindingIndependentMappingService from org.opendaylight.yangtools:binding-generator-impl, which provodes you with methods to do conversion. That service is used also in BindingIndependentConnecor in MD-SAL.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-05-21 11:27:47 -0800

Seen: 150 times

Last updated: May 21 '14