diff options
author | Maros Marsalek <mmarsale@cisco.com> | 2016-10-13 17:37:54 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2016-10-17 09:16:26 +0000 |
commit | 4273f4e051b5f25ebe932e49e72388e56ef0ffd8 (patch) | |
tree | 571387fd4d82cfd721c1093b94786cc8bb14870c /infra/minimal-distribution/src/main/java/io | |
parent | 7236617f71a2090aa1aebac37e2b7b51330cdc73 (diff) |
HONEYCOMB-225 Bump ODL to Boron
Change-Id: I45e30b4815737dd4bafe39d839d90c9799ad3cb7
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'infra/minimal-distribution/src/main/java/io')
4 files changed, 32 insertions, 14 deletions
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<Netconf Constructor<?> 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<Netconf final Class<?> 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<NetconfOper bindingAwareBroker.registerProvider(writer); final Class<?> 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<Capabilities> publisher = + (DataTreeChangeListener<Capabilities>) declaredConstructor.newInstance( + notificationCollector.registerBaseNotificationPublisher()); - ListenerRegistration<DataChangeListener> capabilityChangeListenerRegistration = dataBroker - .registerDataChangeListener(LogicalDatastoreType.OPERATIONAL, capabilitiesIdentifier, - publisher, AsyncDataBroker.DataChangeScope.SUBTREE); + ListenerRegistration<DataTreeChangeListener<Capabilities>> 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/netconf/NetconfServerDispatcherProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfServerDispatcherProvider.java index 1f3caafa1..00c2d1617 100644 --- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfServerDispatcherProvider.java +++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfServerDispatcherProvider.java @@ -25,7 +25,6 @@ import java.util.concurrent.TimeUnit; import org.opendaylight.netconf.api.NetconfServerDispatcher; import org.opendaylight.netconf.api.monitoring.NetconfMonitoringService; import org.opendaylight.netconf.impl.NetconfServerDispatcherImpl; -import org.opendaylight.netconf.impl.NetconfServerSessionNegotiatorFactory; import org.opendaylight.netconf.impl.SessionIdProvider; import org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory; import org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactory; @@ -57,4 +56,17 @@ public final class NetconfServerDispatcherProvider extends ProviderTrait<Netconf return new NetconfServerDispatcherImpl(serverChannelInitializer, nettyThreadgroup, nettyThreadgroup); } + + private static final class NetconfServerSessionNegotiatorFactory extends + org.opendaylight.netconf.impl.NetconfServerSessionNegotiatorFactory { + + NetconfServerSessionNegotiatorFactory(final Timer timer, + final AggregatedNetconfOperationServiceFactory netconfOperationProvider, + final SessionIdProvider sessionIdProvider, + final long connectionTimeoutMillis, + final NetconfMonitoringService monitoringService) { + super(timer, netconfOperationProvider, sessionIdProvider, connectionTimeoutMillis, monitoringService, + org.opendaylight.netconf.impl.NetconfServerSessionNegotiatorFactory.DEFAULT_BASE_CAPABILITIES); + } + } } 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<RestConnector> { |