SimpleAddressObserver

asked 2016-05-04 02:53:57 -0700

migueldmh gravatar image

I am trying to use Hosttracker to get a list host.

My code is based in SimpleAddressObserver link text. I have copy the SimpleAddressObserver code in impl folder using the same name. ProjectModule.java contains the following code.

  public java.lang.AutoCloseable createInstance() {
    DataBroker dataBroker = getDataBrokerDependency();
    NotificationProviderService notificationService = getNotificationServiceDependency();
    HostTrackerImpl mdHostTrackerImpl = new HostTrackerImpl(dataBroker, "flow:1");
    //Error
    mdHostTrackerImpl.registerAsDataChangeListener();
    SimpleAddressObserver simpleAddressObserver = new SimpleAddressObserver(mdHostTrackerImpl,
     notificationService);
    simpleAddressObserver.registerAsNotificationListener();
    return simpleAddressObserver;
}

I am receiving an error during the installation of my feature in karaf exactly when I am registering mdHostTrackerImpl as data change listener.

ERROR

2016-05-04 10:13:01,031 | WARN  | config-pusher    | BindingToNormalizedNodeCodec     | 158 - org.opendaylight.controller.sal-binding-broker-impl - 1.2.2.Lithium-SR2 | Blocking thread to wait for schema convergence updates for 5 SECONDS

2016-05-04 10:13:06,033 | ERROR | config-pusher    | ConfigTransactionControllerImpl  | 114 - org.opendaylight.controller.config-manager - 0.3.2.Lithium-SR2 | Commit failed on ModuleIdentifier{factoryName='project-impl', instanceName='project-impl'} in transaction TransactionIdentifier{name='ConfigTransaction-76-78'}

org.opendaylight.yangtools.binding.data.codec.impl.MissingSchemaForClassException: Schema is not available for interface org.opendaylight.yang.gen.v1.urn.opendaylight.address.tracker.rev140617.AddressCapableNodeConnector
at org.opendaylight.yangtools.binding.data.codec.impl.MissingSchemaForClassException.forClass(MissingSchemaForClassException.java:35)
at org.opendaylight.yangtools.binding.data.codec.impl.MissingSchemaForClassException.check(MissingSchemaForClassException.java:50)
at org.opendaylight.yangtools.binding.data.codec.impl.DataContainerCodecContext.childNonNull(DataContainerCodecContext.java:177)
at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.bindingPathArgumentChild(DataObjectCodecContext.java:184)
at org.opendaylight.yangtools.binding.data.codec.impl.BindingCodecContext.getCodecContextNode(BindingCodecContext.java:127)

am I missing something?

Is It a dependency problem?

are there more examples of hosttracker?

edit retag flag offensive close merge delete