Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-647

onDataChange notification is not returning any data to the getCreatedData and getModifiedData function calls. Data change notification does not seem to work.

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • Helium
    • None
    • mdsal
    • None
    • Operating System: Linux
      Platform: PC

    • 1418

    Description

      After rebase on July 24th, the AsyncDataChangeEvent getCreatedData and getUpdatedData is no longer returning any data.
      I have uploaded the sample code to git fetch https://git.opendaylight.org/gerrit/controller refs/changes/04/8804/2 && git checkout FETCH_HEAD

      Essentially, I am creating a node extension, and then registering for data changes on the node extension.
      dataChangeListenerRegistration = dataService.registerDataChangeListener(LogicalDatastoreType.CONFIGURATION,InstanceIdentifier.builder(Nodes.class) .child(Node.class).augmentation(SampleTestNode.class).toInstance(),wakeupListener,DataChangeScope.SUBTREE);

      and then in the onDataChanged method:
      public void onDataChanged(final AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> change) {
      Map<InstanceIdentifier<?>, DataObject> created = change.getCreatedData();
      Map<InstanceIdentifier<?>, DataObject> modified = change.getUpdatedData();
      if(created.isEmpty())

      { System.out.println("created map is empty"); }

      if(modified.isEmpty())

      { System.out.println("modified map is empty"); }

      }

      In both the created/updated scenarios, the appropriate maps are empty.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jhajnar@cisco.com Jan Hajnar
              ramkumar.gowrishankar@gmail.com Ramkumar Gowrishankar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: