From 77846f89d703a925b2d549564e143ec0cc2ebab8 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Wed, 15 Mar 2017 23:08:34 +0100 Subject: Bump ODL dependencies to Boron-SR3 Boron SR3 contains fixes for HC2VPP-62,HC2VPP-69,HC2VPP-68 Change-Id: I06ad40da6fe2f702c735bfa5413de19ba3132046 Signed-off-by: Marek Gradzki --- common/honeycomb-parent/pom.xml | 22 ++++++++++++++-------- .../netconf/NetconfMonitoringMapperProvider.java | 12 ++++++++---- .../netconf/NetconfNotificationMapperProvider.java | 18 ++++++++++-------- .../infra/distro/restconf/RestconfProvider.java | 2 +- .../test/resources/expected-persisted-output.txt | 4 ++-- 5 files changed, 35 insertions(+), 23 deletions(-) diff --git a/common/honeycomb-parent/pom.xml b/common/honeycomb-parent/pom.xml index d6b53a4ce..c0efd8de8 100644 --- a/common/honeycomb-parent/pom.xml +++ b/common/honeycomb-parent/pom.xml @@ -43,13 +43,13 @@ UTF-8 - 0.8.4-Beryllium-SR4 - 2.0.4-Beryllium-SR4 - 1.3.4-Beryllium-SR4 - 0.8.4-Beryllium-SR4 - 1.0.4-Beryllium-SR4 - 1.3.4-Beryllium-SR4 - 0.8.4-Beryllium-SR4 + 1.0.3-Boron-SR3 + 2.1.3-Boron-SR3 + 1.4.3-Boron-SR3 + 0.9.3-Boron-SR3 + 1.1.3-Boron-SR3 + 1.4.3-Boron-SR3 + 0.9.3-Boron-SR3 target/generated-sources/mdsal-binding @@ -59,7 +59,7 @@ 18.0 - 2.16 + 2.17 7.1.2 2.10.3 0.7.2.201409121644 @@ -273,6 +273,12 @@ checkstyle-logging ${yangtools.version} + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringMapperProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringMapperProvider.java index 46a46ba47..f617ded44 100644 --- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringMapperProvider.java +++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringMapperProvider.java @@ -50,9 +50,11 @@ public final class NetconfMonitoringMapperProvider extends ProviderTrait declaredConstructor = monitoringWriterCls.getDeclaredConstructor(NetconfMonitoringService.class); declaredConstructor.setAccessible(true); - final BindingAwareProvider o = (BindingAwareProvider) declaredConstructor.newInstance(monitoringService); - bindingAwareBroker.registerProvider(o); + final BindingAwareProvider writer = (BindingAwareProvider) declaredConstructor.newInstance(monitoringService); + bindingAwareBroker.registerProvider(writer); + final Class moduleClass = Class.forName( + "org.opendaylight.controller.config.yang.netconf.mdsal.monitoring.NetconfMdsalMonitoringMapperModule"); final Class monitoringMapperCls = Class.forName( "org.opendaylight.controller.config.yang.netconf.mdsal.monitoring.NetconfMdsalMonitoringMapperModule$MdsalMonitoringMapper"); declaredConstructor = @@ -64,10 +66,12 @@ public final class NetconfMonitoringMapperProvider extends ProviderTrait monitoringMpperFactory = Class.forName( "org.opendaylight.controller.config.yang.netconf.mdsal.monitoring.NetconfMdsalMonitoringMapperModule$MdSalMonitoringMapperFactory"); declaredConstructor = - monitoringMpperFactory.getDeclaredConstructor(NetconfOperationService.class); + monitoringMpperFactory.getDeclaredConstructor(NetconfOperationService.class, moduleClass, monitoringWriterCls); declaredConstructor.setAccessible(true); + // The second argument is null, it should be the parent cfg-subsystem module class instance, that we dont have + // it's used only during close so dont close the factory using its close() method final NetconfOperationServiceFactory mdSalMonitoringMapperFactory = - (NetconfOperationServiceFactory) declaredConstructor.newInstance(mdSalMonitoringMapper); + (NetconfOperationServiceFactory) declaredConstructor.newInstance(mdSalMonitoringMapper, null, writer); aggregator.onAddNetconfOperationServiceFactory(mdSalMonitoringMapperFactory); return mdSalMonitoringMapperFactory; } catch (final ReflectiveOperationException e) { 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 2c2631b0b..2554d026c 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.DataChangeListener; -import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker; +import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener; +import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier; 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,16 +72,18 @@ public class NetconfNotificationMapperProvider extends ProviderTrait notifPublisherCls = Class.forName( - "org.opendaylight.controller.config.yang.netconf.mdsal.notification.BaseCapabilityChangeNotificationPublisher"); + "org.opendaylight.controller.config.yang.netconf.mdsal.notification.CapabilityChangeNotificationProducer"); declaredConstructor = notifPublisherCls.getDeclaredConstructor(BaseNotificationPublisherRegistration.class); declaredConstructor.setAccessible(true); - final DataChangeListener publisher = (DataChangeListener) declaredConstructor.newInstance( - notificationCollector.registerBaseNotificationPublisher()); + final DataTreeChangeListener publisher = + (DataTreeChangeListener) declaredConstructor.newInstance( + notificationCollector.registerBaseNotificationPublisher()); - ListenerRegistration capabilityChangeListenerRegistration = dataBroker - .registerDataChangeListener(LogicalDatastoreType.OPERATIONAL, capabilitiesIdentifier, - publisher, AsyncDataBroker.DataChangeScope.SUBTREE); + ListenerRegistration> capabilityChangeListenerRegistration = dataBroker + .registerDataTreeChangeListener( + new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, capabilitiesIdentifier), + publisher); NetconfNotificationOperationServiceFactory netconfNotificationOperationServiceFactory = new NetconfNotificationOperationServiceFactory(notificationRegistry); aggregator.onAddNetconfOperationServiceFactory(netconfNotificationOperationServiceFactory); diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfProvider.java index 94d508c99..6664c7d33 100644 --- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfProvider.java +++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfProvider.java @@ -22,7 +22,7 @@ import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration; import org.opendaylight.controller.sal.core.api.Broker; import org.opendaylight.netconf.sal.rest.api.RestConnector; import org.opendaylight.netconf.sal.restconf.impl.RestconfProviderImpl; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber; final class RestconfProvider extends ProviderTrait { diff --git a/infra/translate-utils/src/test/resources/expected-persisted-output.txt b/infra/translate-utils/src/test/resources/expected-persisted-output.txt index f0f5902e2..3e588c381 100644 --- a/infra/translate-utils/src/test/resources/expected-persisted-output.txt +++ b/infra/translate-utils/src/test/resources/expected-persisted-output.txt @@ -1,8 +1,8 @@ { - "test-persistence:top-container": { + "test-persistence:top-container2": { "string": "testing" }, - "test-persistence:top-container2": { + "test-persistence:top-container": { "string": "testing" } } \ No newline at end of file -- cgit 1.2.3-korg