Hosts not visible under IfIptoHost interface of HostTracker

asked 2015-08-04 02:04:18 -0800

liopis gravatar image

updated 2015-08-05 01:22:06 -0800

Hi,

I'm writing a ‘native’ OpenDaylight application which uses the OSGi interfaces (Java APIs) exposed by OpenDaylight framework (Helium SR3). In my particular case I just want to get all the hosts (of a Mininet network) over the IfIptoHost interface of the HostTracker module (i.e. org.opendaylight.controller.hosttracker.IfIptoHost). I am following the post "http://thenewstack.io/writing-opendaylight-applications/" and what I basically do is:

  1. Register to the IfIptoHost service by creating a dependency in my app's bundle activator within the configureInstance() method: c.add(createContainerServiceDependency(containerName).setService(IfIptoHost.class).setCallbacks(...).setRequired(true))

  2. Once I got the IfIptoHost osgi service I try to make the following call:

    Set<HostNodeConnector> allhosts = iptoHost.getAllHosts();

I am debugging my code under Eclipse (ODL remote debugging) and I can see that allhosts set is empty. However, if I run the HTTP/REST call shown below I get all the hosts within the response. DLUX is also showing the hosts.

http://localhost:8080/restconf/operational/network-topology:network-topology/topology/flow:1/

What could be the problem? Is there any alternative to get all the hosts of my mininet's network using the ODL's JAVA API?

BR,

Juan

edit retag flag offensive close merge delete