summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/api-parent/pom.xml2
-rw-r--r--common/honeycomb-parent/pom.xml31
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringMapperProvider.java12
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java18
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfServerDispatcherProvider.java14
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfProvider.java2
-rw-r--r--infra/translate-utils/src/test/resources/expected-persisted-output.txt4
7 files changed, 54 insertions, 29 deletions
diff --git a/common/api-parent/pom.xml b/common/api-parent/pom.xml
index 531e47009..8baec3694 100644
--- a/common/api-parent/pom.xml
+++ b/common/api-parent/pom.xml
@@ -40,7 +40,7 @@
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>0.8.2-Beryllium-SR2</version>
+ <version>0.9.0-Boron</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/common/honeycomb-parent/pom.xml b/common/honeycomb-parent/pom.xml
index 5843d4144..511e685ff 100644
--- a/common/honeycomb-parent/pom.xml
+++ b/common/honeycomb-parent/pom.xml
@@ -43,27 +43,28 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- ODL dependencies -->
- <yangtools.version>0.8.2-Beryllium-SR2</yangtools.version>
- <mdsal.version>2.0.2-Beryllium-SR2</mdsal.version>
- <mdsal.controller.version>1.3.2-Beryllium-SR2</mdsal.controller.version>
- <mdsalmodel.version>0.8.2-Beryllium-SR2</mdsalmodel.version>
- <netconf.version>1.0.2-Beryllium-SR2</netconf.version>
- <restconf.version>1.3.2-Beryllium-SR2</restconf.version>
+ <yangtools.version>1.0.0-Boron</yangtools.version>
+ <mdsal.version>2.1.0-Boron</mdsal.version>
+ <mdsal.controller.version>1.4.0-Boron</mdsal.controller.version>
+ <mdsalmodel.version>0.9.0-Boron</mdsalmodel.version>
+ <netconf.version>1.1.0-Boron</netconf.version>
+ <restconf.version>1.4.0-Boron</restconf.version>
<salGeneratorPath>target/generated-sources/mdsal-binding</salGeneratorPath>
<!-- dependencies -->
<junit.version>4.11</junit.version>
- <mockito.version>1.9.5</mockito.version>
+ <mockito.version>1.10.19</mockito.version>
<hamcrest.version>1.3</hamcrest.version>
<guava.version>18.0</guava.version>
<!-- plugins -->
- <checkstyle.version>2.16</checkstyle.version>
+ <checkstyle.plugin.version>2.17</checkstyle.plugin.version>
+ <checkstyle.version>6.16</checkstyle.version>
<maven.javadoc.version>2.10.3</maven.javadoc.version>
<jacoco.version>0.7.2.201409121644</jacoco.version>
<enforcer.version>1.4</enforcer.version>
- <maven.compile.plugin.version>3.3</maven.compile.plugin.version>
- <maven.bundle.version>3.0.0</maven.bundle.version>
+ <maven.compile.plugin.version>3.5.1</maven.compile.plugin.version>
+ <maven.bundle.version>3.0.1</maven.bundle.version>
<!-- checkstyle -->
<checkstyle.header.file>APACHE_HEADER.txt</checkstyle.header.file>
@@ -72,7 +73,7 @@
<!-- skip location check = makes site exec faster -->
<dependency.locations.enabled>false</dependency.locations.enabled>
<project.info.report.version>2.9</project.info.report.version>
- <maven.resources.version>2.6</maven.resources.version>
+ <maven.resources.version>3.0.1</maven.resources.version>
<maven.site.version>3.4</maven.site.version>
<!-- adoc -->
<asciidoctor.maven.plugin.version>1.5.3</asciidoctor.maven.plugin.version>
@@ -202,7 +203,7 @@
<!-- checkstyle -->
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>${checkstyle.version}</version>
+ <version>${checkstyle.plugin.version}</version>
<configuration>
<!-- Override checkstyle configuration to fit Honeycomb coding style-->
<configLocation>honeycomb-checkstyle.xml</configLocation>
@@ -273,6 +274,12 @@
<artifactId>checkstyle-logging</artifactId>
<version>${yangtools.version}</version>
</dependency>
+ <!-- Needed by ODL's checkstyle-logging -->
+ <dependency>
+ <groupId>com.puppycrawl.tools</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>${checkstyle.version}</version>
+ </dependency>
</dependencies>
</plugin>
<!-- Deactivate strict java8 checks -->
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> {
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