Hi Priyanka,

         You can do following and maybe that would help:

            public class MyClass implements DataChangeListener,
OpendaylightInventoryListener {

           public MyClass () {
                notificationService.registerNotificationListener(this);
                // You don't need to create any instance identifier of Node
class as you would want to know about every node that will be added.
                //Unless you want to observe a particular node in your
topology
           }

          // It is because these are notification raised by
OpendaylightInventoryListener and you are not looking for datachange in
node repository
          // so you don't need to create InstanceIdentifier and provide
that.
          @Override
          public void onNodeUpdated(NodeUpdated nodeUpdated) {
                 LOG.debug("Node updated {}", nodeUpdated);
          }
}

On Wed, Oct 12, 2016 at 2:20 AM, priyanka chopra <priyanka71...@gmail.com>
wrote:

> Hi All,
>
> I wanted to capture the new node event for which I did the following:
>
>    - Implemented the OpendaylightInventoryListener and DataChangeListener(
>    on Node object)
>    - notificationService.registerNotificationListener(myClass)
>    - Overridden onNodeUpdated() method in myClass
>    - dataBroker.registerDataChangeListener(LogicalDatastoreType.O
>    PERATIONAL, nodeInstanceIdentifier, myClass, DataBroker.DataChangeScope
>    .BASE)
>
> After this when I added a new OF(1.3) node, I am able to get the
> datachange event, however couldnt capture notification event
> in onNodeUpdated().
> Is there anything else that I am missing? Please suggest.
>
> Thanks
> Priyanka
>
>
>
>
> _______________________________________________
> L2switch-dev mailing list
> L2switch-dev@lists.opendaylight.org
> https://lists.opendaylight.org/mailman/listinfo/l2switch-dev
>
>
_______________________________________________
L2switch-dev mailing list
L2switch-dev@lists.opendaylight.org
https://lists.opendaylight.org/mailman/listinfo/l2switch-dev

Reply via email to