|
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.
|