From 14c47d940c385ee563134a2708eac64e0d718204 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Tue, 7 Feb 2017 16:53:06 +0100 Subject: Downgrade ODL dependencies to Beryllium-SR4 Workaround for HC2VPP-62 until https://bugs.opendaylight.org/show_bug.cgi?id=7759 is fixed. Change-Id: I0e9c82378865bf99c1843b0399940a53350e2d76 Signed-off-by: Marek Gradzki --- .../netconf/NetconfNotificationMapperProvider.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java') diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java index 2554d026c..2c2631b0b 100644 --- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java +++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java @@ -21,8 +21,8 @@ import com.google.inject.name.Named; import io.fd.honeycomb.infra.distro.ProviderTrait; import java.lang.reflect.Constructor; import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener; -import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier; +import org.opendaylight.controller.md.sal.binding.api.DataChangeListener; +import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; import org.opendaylight.controller.sal.binding.api.BindingAwareProvider; @@ -72,18 +72,16 @@ public class NetconfNotificationMapperProvider extends ProviderTrait notifPublisherCls = Class.forName( - "org.opendaylight.controller.config.yang.netconf.mdsal.notification.CapabilityChangeNotificationProducer"); + "org.opendaylight.controller.config.yang.netconf.mdsal.notification.BaseCapabilityChangeNotificationPublisher"); declaredConstructor = notifPublisherCls.getDeclaredConstructor(BaseNotificationPublisherRegistration.class); declaredConstructor.setAccessible(true); - final DataTreeChangeListener publisher = - (DataTreeChangeListener) declaredConstructor.newInstance( - notificationCollector.registerBaseNotificationPublisher()); + final DataChangeListener publisher = (DataChangeListener) declaredConstructor.newInstance( + notificationCollector.registerBaseNotificationPublisher()); - ListenerRegistration> capabilityChangeListenerRegistration = dataBroker - .registerDataTreeChangeListener( - new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, capabilitiesIdentifier), - publisher); + ListenerRegistration capabilityChangeListenerRegistration = dataBroker + .registerDataChangeListener(LogicalDatastoreType.OPERATIONAL, capabilitiesIdentifier, + publisher, AsyncDataBroker.DataChangeScope.SUBTREE); NetconfNotificationOperationServiceFactory netconfNotificationOperationServiceFactory = new NetconfNotificationOperationServiceFactory(notificationRegistry); aggregator.onAddNetconfOperationServiceFactory(netconfNotificationOperationServiceFactory); -- cgit 1.2.3-korg