summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-11-07 09:21:08 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-11-10 10:00:39 +0100
commit0f92e8f1eb7ec29f589ed92c55b049f13cce0f30 (patch)
tree30e7fa6562a136755f1e5a9e5348db51c221f59b
parentcccd174ab736465bc36faacfeaa30297acb724a7 (diff)
HONEYCOMB-385: bump ODL dependencies to Nitrogen
* guava bumped to 22.0 (same as used by ODL) * use 4K RSA for SSH server (related to bouncy-castle bump in ODL) - based on https://git.opendaylight.org/gerrit/#/c/60138/2 - also fixes HC2VPP-207 * removed some yang models from netconf-whitelist.xml, that are no longer present in ODL dependencies, * increased timeouts in distro tests, because generating 4K RSA key my last longer (especially on slow jenkins nodes). * EmptyMountPointService exposed to enable reuse by notification and restconf providers Change-Id: I2ff32bd7f0298716210fcfee4918007a42fab171 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
-rw-r--r--common/api-parent/pom.xml4
-rw-r--r--common/honeycomb-parent/pom.xml34
-rw-r--r--common/scripts-parent/pom.xml4
-rw-r--r--common/yang-whitelist/yang-whitelist-impl/pom.xml1
-rw-r--r--infra/bgp-distribution-test/src/test/java/io/fd/honeycomb/infra/bgp/distro/BgpDistributionTest.java2
-rw-r--r--infra/impl/src/main/java/io/fd/honeycomb/impl/EmptyDomMountService.java56
-rw-r--r--infra/impl/src/main/java/io/fd/honeycomb/impl/NorthboundFacadeHoneycombDOMBroker.java77
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.java8
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMBrokerProvider.java7
-rw-r--r--infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/BaseMinimalDistributionTest.java8
-rw-r--r--infra/minimal-distribution/pom.xml1
-rw-r--r--infra/northbound/bgp-extensions/evpn/pom.xml2
-rw-r--r--infra/northbound/bgp-extensions/extension-common/pom.xml8
-rw-r--r--infra/northbound/bgp-extensions/inet/pom.xml2
-rw-r--r--infra/northbound/bgp-extensions/l3-vpn-v4/pom.xml2
-rw-r--r--infra/northbound/bgp-extensions/l3-vpn-v6/pom.xml2
-rw-r--r--infra/northbound/bgp-extensions/labeled-unicast/pom.xml2
-rw-r--r--infra/northbound/bgp-extensions/linkstate/pom.xml2
-rw-r--r--infra/northbound/bgp/pom.xml2
-rw-r--r--infra/northbound/netconf/pom.xml1
-rw-r--r--infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfSshServerProvider.java12
-rw-r--r--infra/northbound/netconf/src/main/resources/honeycomb-minimal-resources/config/netconf-whitelist.xml44
-rw-r--r--infra/northbound/restconf/pom.xml1
-rw-r--r--infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java35
-rw-r--r--infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/JsonUtilsTest.java4
25 files changed, 151 insertions, 170 deletions
diff --git a/common/api-parent/pom.xml b/common/api-parent/pom.xml
index 2c7442ab4..08939c57e 100644
--- a/common/api-parent/pom.xml
+++ b/common/api-parent/pom.xml
@@ -35,12 +35,12 @@
<plugin>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-maven-plugin</artifactId>
- <version>${yangtools.version}</version>
+ <version>${odl.yangtools.version}</version>
<dependencies>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>${salGenerator.version}</version>
+ <version>${odl.salGenerator.version}</version>
<type>jar</type>
</dependency>
</dependencies>
diff --git a/common/honeycomb-parent/pom.xml b/common/honeycomb-parent/pom.xml
index 8f38eb9c6..0e8e52755 100644
--- a/common/honeycomb-parent/pom.xml
+++ b/common/honeycomb-parent/pom.xml
@@ -46,21 +46,21 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- ODL dependencies -->
- <yangtools.version>1.1.2-Carbon</yangtools.version>
- <mdsal.version>2.2.2-Carbon</mdsal.version>
- <mdsal.controller.version>1.5.2-Carbon</mdsal.controller.version>
- <mdsalmodel.version>0.10.2-Carbon</mdsalmodel.version>
- <netconf.version>1.2.2-Carbon</netconf.version>
- <restconf.version>1.5.2-Carbon</restconf.version>
- <salGenerator.version>0.10.2-Carbon</salGenerator.version>
- <bgpcep.version>0.7.2-Carbon</bgpcep.version>
+ <odl.yangtools.version>1.2.0</odl.yangtools.version>
+ <odl.mdsal.version>2.3.0</odl.mdsal.version>
+ <odl.mdsal.controller.version>1.6.0</odl.mdsal.controller.version>
+ <odl.mdsalmodel.version>0.11.0</odl.mdsalmodel.version>
+ <odl.netconf.version>1.3.0</odl.netconf.version>
+ <odl.restconf.version>1.6.0</odl.restconf.version>
+ <odl.salGenerator.version>0.11.0</odl.salGenerator.version>
+ <odl.bgpcep.version>0.8.0</odl.bgpcep.version>
<salGeneratorPath>target/generated-sources/mdsal-binding</salGeneratorPath>
<!-- common dependencies -->
<junit.version>4.11</junit.version>
<mockito.version>2.2.9</mockito.version>
<hamcrest.version>1.3</hamcrest.version>
- <guava.version>18.0</guava.version>
+ <guava.version>22.0</guava.version>
<jsr305.version>3.0.0</jsr305.version>
<slf4j.version>1.7.21</slf4j.version>
@@ -133,49 +133,49 @@
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yangtools-artifacts</artifactId>
- <version>${yangtools.version}</version>
+ <version>${odl.yangtools.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>mdsal-artifacts</artifactId>
- <version>${mdsal.controller.version}</version>
+ <version>${odl.mdsal.controller.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-artifacts</artifactId>
- <version>${mdsal.version}</version>
+ <version>${odl.mdsal.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>netconf-artifacts</artifactId>
- <version>${netconf.version}</version>
+ <version>${odl.netconf.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>restconf-artifacts</artifactId>
- <version>${restconf.version}</version>
+ <version>${odl.restconf.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>mdsal-model-artifacts</artifactId>
- <version>${mdsalmodel.version}</version>
+ <version>${odl.mdsalmodel.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>bgpcep-artifacts</artifactId>
- <version>${bgpcep.version}</version>
+ <version>${odl.bgpcep.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -295,7 +295,7 @@
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>checkstyle-logging</artifactId>
- <version>${yangtools.version}</version>
+ <version>${odl.yangtools.version}</version>
</dependency>
<!-- Needed by ODL's checkstyle-logging -->
<dependency>
diff --git a/common/scripts-parent/pom.xml b/common/scripts-parent/pom.xml
index b47bb46a6..9e730e84e 100644
--- a/common/scripts-parent/pom.xml
+++ b/common/scripts-parent/pom.xml
@@ -32,7 +32,7 @@
<groovy.version>2.4.7</groovy.version>
<groovy.eclipse.compiler.version>2.9.2-01</groovy.eclipse.compiler.version>
<groovy.eclipse.batch.version>2.4.3-01</groovy.eclipse.batch.version>
- <yang-binding.version>0.10.2-Carbon</yang-binding.version>
+ <odl.yang-binding.version>0.11.0</odl.yang-binding.version>
</properties>
<dependencyManagement>
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>yang-binding</artifactId>
- <version>${yang-binding.version}</version>
+ <version>${odl.yang-binding.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
diff --git a/common/yang-whitelist/yang-whitelist-impl/pom.xml b/common/yang-whitelist/yang-whitelist-impl/pom.xml
index b40fad14f..518dacc54 100644
--- a/common/yang-whitelist/yang-whitelist-impl/pom.xml
+++ b/common/yang-whitelist/yang-whitelist-impl/pom.xml
@@ -68,7 +68,6 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>19.0</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/infra/bgp-distribution-test/src/test/java/io/fd/honeycomb/infra/bgp/distro/BgpDistributionTest.java b/infra/bgp-distribution-test/src/test/java/io/fd/honeycomb/infra/bgp/distro/BgpDistributionTest.java
index d102f76b4..93dddf113 100644
--- a/infra/bgp-distribution-test/src/test/java/io/fd/honeycomb/infra/bgp/distro/BgpDistributionTest.java
+++ b/infra/bgp-distribution-test/src/test/java/io/fd/honeycomb/infra/bgp/distro/BgpDistributionTest.java
@@ -71,7 +71,7 @@ public class BgpDistributionTest {
Unirest.setHttpClient(httpclient);
}
- @Test(timeout = 120000)
+ @Test(timeout = 180000)
public void test() throws Exception {
Main.init(new ActivationModule());
LOG.info("Testing Honeycomb BGP distribution");
diff --git a/infra/impl/src/main/java/io/fd/honeycomb/impl/EmptyDomMountService.java b/infra/impl/src/main/java/io/fd/honeycomb/impl/EmptyDomMountService.java
new file mode 100644
index 000000000..c42045f11
--- /dev/null
+++ b/infra/impl/src/main/java/io/fd/honeycomb/impl/EmptyDomMountService.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2015, 2017 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.impl;
+
+import com.google.common.base.Optional;
+import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
+import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
+import org.opendaylight.controller.sal.core.api.mount.MountProvisionListener;
+import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+
+/**
+ * Empty implementation of DOMMountPointService. HC does not support mountpoints, but Restconf requires
+ * DOMMountPointService implementation to be present.
+ */
+public class EmptyDomMountService implements DOMMountPointService {
+ @Override
+ public Optional<DOMMountPoint> getMountPoint(final YangInstanceIdentifier yangInstanceIdentifier) {
+ return Optional.absent();
+ }
+
+ @Override
+ public DOMMountPointBuilder createMountPoint(final YangInstanceIdentifier yangInstanceIdentifier) {
+ throw new UnsupportedOperationException("No mountpoint support");
+ }
+
+ @Override
+ public ListenerRegistration<MountProvisionListener> registerProvisionListener(
+ final MountProvisionListener mountProvisionListener) {
+ return new ListenerRegistration<MountProvisionListener>() {
+ @Override
+ public void close() {
+ // Noop
+ }
+
+ @Override
+ public MountProvisionListener getInstance() {
+ return mountProvisionListener;
+ }
+ };
+ }
+}
diff --git a/infra/impl/src/main/java/io/fd/honeycomb/impl/NorthboundFacadeHoneycombDOMBroker.java b/infra/impl/src/main/java/io/fd/honeycomb/impl/NorthboundFacadeHoneycombDOMBroker.java
index ebf0e6ed2..96f24f7cd 100644
--- a/infra/impl/src/main/java/io/fd/honeycomb/impl/NorthboundFacadeHoneycombDOMBroker.java
+++ b/infra/impl/src/main/java/io/fd/honeycomb/impl/NorthboundFacadeHoneycombDOMBroker.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Cisco and/or its affiliates.
+ * Copyright (c) 2015, 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,34 +16,20 @@
package io.fd.honeycomb.impl;
-import com.google.common.base.Optional;
import com.google.common.collect.Maps;
-import com.google.common.util.concurrent.CheckedFuture;
-import com.google.common.util.concurrent.Futures;
import java.util.Map;
import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import javax.annotation.concurrent.NotThreadSafe;
import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
-import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
import org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService;
import org.opendaylight.controller.md.sal.dom.api.DOMNotificationService;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcAvailabilityListener;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcException;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcImplementationNotAvailableException;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
import org.opendaylight.controller.sal.core.api.Broker;
import org.opendaylight.controller.sal.core.api.BrokerService;
import org.opendaylight.controller.sal.core.api.Consumer;
import org.opendaylight.controller.sal.core.api.Provider;
import org.opendaylight.controller.sal.core.api.model.SchemaService;
-import org.opendaylight.controller.sal.core.api.mount.MountProvisionListener;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
-import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
-import org.opendaylight.yangtools.yang.model.api.SchemaPath;
import org.osgi.framework.BundleContext;
/**
@@ -51,14 +37,13 @@ import org.osgi.framework.BundleContext;
*/
public class NorthboundFacadeHoneycombDOMBroker implements AutoCloseable, Broker {
- private static final BrokerService EMPTY_DOM_MOUNT_SERVICE = new EmptyDomMountService();
-
private Map<Class<? extends BrokerService>, BrokerService> services;
public NorthboundFacadeHoneycombDOMBroker(@Nonnull final DOMDataBroker domDataBrokerDependency,
@Nonnull final SchemaService schemaBiService,
@Nonnull final DOMNotificationService domNotificatioNService,
- @Nonnull final DOMRpcService domRpcService) {
+ @Nonnull final DOMRpcService domRpcService,
+ @Nonnull final DOMMountPointService domMountPointService) {
services = Maps.newHashMap();
services.put(DOMDataBroker.class, domDataBrokerDependency);
services.put(SchemaService.class, schemaBiService);
@@ -66,7 +51,7 @@ public class NorthboundFacadeHoneycombDOMBroker implements AutoCloseable, Broker
services.put(DOMNotificationPublishService.class, domNotificatioNService);
services.put(DOMRpcService.class, domRpcService);
// Required to be present by Restconf northbound even if not used:
- services.put(DOMMountPointService.class, EMPTY_DOM_MOUNT_SERVICE);
+ services.put(DOMMountPointService.class, domMountPointService);
}
@Override
@@ -147,58 +132,4 @@ public class NorthboundFacadeHoneycombDOMBroker implements AutoCloseable, Broker
closed = true;
}
}
-
- private static class EmptyDomRpcService implements DOMRpcService {
- @Nonnull
- @Override
- public CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(@Nonnull final SchemaPath schemaPath,
- @Nullable final NormalizedNode<?, ?> normalizedNode) {
- return Futures.<DOMRpcResult, DOMRpcException>immediateFailedCheckedFuture(
- new DOMRpcImplementationNotAvailableException("RPCs not supported"));
- }
-
- @Nonnull
- @Override
- public <T extends DOMRpcAvailabilityListener> ListenerRegistration<T> registerRpcListener(@Nonnull final T t) {
- return new ListenerRegistration<T>() {
- @Override
- public void close() {
- // Noop
- }
-
- @Override
- public T getInstance() {
- return t;
- }
- };
- }
- }
-
- private static class EmptyDomMountService implements DOMMountPointService {
- @Override
- public Optional<DOMMountPoint> getMountPoint(final YangInstanceIdentifier yangInstanceIdentifier) {
- return Optional.absent();
- }
-
- @Override
- public DOMMountPointBuilder createMountPoint(final YangInstanceIdentifier yangInstanceIdentifier) {
- throw new UnsupportedOperationException("No mountpoint support");
- }
-
- @Override
- public ListenerRegistration<MountProvisionListener> registerProvisionListener(
- final MountProvisionListener mountProvisionListener) {
- return new ListenerRegistration<MountProvisionListener>() {
- @Override
- public void close() {
- // Noop
- }
-
- @Override
- public MountProvisionListener getInstance() {
- return mountProvisionListener;
- }
- };
- }
- }
}
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.java
index 29cccccdf..c1e67a5df 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2016, 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ import io.fd.honeycomb.data.ModifiableDataManager;
import io.fd.honeycomb.data.ReadableDataManager;
import io.fd.honeycomb.data.init.DataTreeInitializer;
import io.fd.honeycomb.data.init.ShutdownHandler;
+import io.fd.honeycomb.impl.EmptyDomMountService;
import io.fd.honeycomb.impl.ShutdownHandlerImpl;
import io.fd.honeycomb.infra.distro.data.config.WriterRegistryProvider;
import io.fd.honeycomb.infra.distro.data.oper.ReadableDTDelegProvider;
@@ -33,6 +34,7 @@ import io.fd.honeycomb.translate.read.registry.ReaderRegistry;
import io.fd.honeycomb.translate.write.registry.WriterRegistry;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
+import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter;
import org.opendaylight.controller.sal.core.api.Broker;
@@ -47,6 +49,10 @@ public class ConfigAndOperationalPipelineModule extends PrivateModule {
bind(ShutdownHandler.class).to(ShutdownHandlerImpl.class).in(Singleton.class);
expose(ShutdownHandler.class);
+ // Mount point service is required by notification service and restconf
+ bind(DOMMountPointService.class).to(EmptyDomMountService.class).in(Singleton.class);
+ expose(DOMMountPointService.class);
+
// Expose registries for plugin reader/writer factories
bind(WriterRegistry.class).toProvider(WriterRegistryProvider.class).in(Singleton.class);
expose(WriterRegistry.class);
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMBrokerProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMBrokerProvider.java
index 9ae9d59b8..b0a3ceba4 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMBrokerProvider.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMBrokerProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2016, 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ import com.google.inject.name.Named;
import io.fd.honeycomb.binding.init.ProviderTrait;
import io.fd.honeycomb.impl.NorthboundFacadeHoneycombDOMBroker;
import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
+import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter;
import org.opendaylight.controller.sal.core.api.Broker;
@@ -39,10 +40,12 @@ final class HoneycombDOMBrokerProvider extends ProviderTrait<Broker> {
private DOMNotificationRouter domNotificationService;
@Inject
private DOMRpcService domRpcService;
+ @Inject
+ private DOMMountPointService domMountPointService;
@Override
protected NorthboundFacadeHoneycombDOMBroker create() {
return new NorthboundFacadeHoneycombDOMBroker(domDataBroker, schemaService, domNotificationService,
- domRpcService);
+ domRpcService, domMountPointService);
}
}
diff --git a/infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/BaseMinimalDistributionTest.java b/infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/BaseMinimalDistributionTest.java
index 8377dc4c8..f083903fe 100644
--- a/infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/BaseMinimalDistributionTest.java
+++ b/infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/BaseMinimalDistributionTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2016, 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -75,7 +75,7 @@ public class BaseMinimalDistributionTest {
/**
* Start base distribution and check all northbound interfaces
*/
- @Test(timeout = 120000)
+ @Test(timeout = 180000)
public void test() throws Exception {
Main.init(new ActivationModule());
@@ -121,14 +121,14 @@ public class BaseMinimalDistributionTest {
Properties config = new Properties();
config.put("StrictHostKeyChecking", "no");
session.setConfig(config);
- session.connect(20000);
+ session.connect(60000);
Channel channel = session.openChannel("subsystem");
((ChannelSubsystem) channel).setSubsystem("netconf");
((ChannelSubsystem) channel).setPty(true);
final InputStream inputStream = channel.getInputStream();
- channel.connect(20000);
+ channel.connect(60000);
// Wait until hello msg is sent from server
Thread.sleep(HELLO_WAIT);
diff --git a/infra/minimal-distribution/pom.xml b/infra/minimal-distribution/pom.xml
index ead621761..d7778422b 100644
--- a/infra/minimal-distribution/pom.xml
+++ b/infra/minimal-distribution/pom.xml
@@ -74,7 +74,6 @@
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
-
<dependency>
<groupId>io.fd.honeycomb.northbound</groupId>
<artifactId>restconf</artifactId>
diff --git a/infra/northbound/bgp-extensions/evpn/pom.xml b/infra/northbound/bgp-extensions/evpn/pom.xml
index d42447c4f..eaae4119f 100644
--- a/infra/northbound/bgp-extensions/evpn/pom.xml
+++ b/infra/northbound/bgp-extensions/evpn/pom.xml
@@ -39,7 +39,7 @@
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>bgp-evpn</artifactId>
- <version>${bgpcep.version}</version>
+ <version>${odl.bgpcep.version}</version>
</dependency>
</dependencies>
diff --git a/infra/northbound/bgp-extensions/extension-common/pom.xml b/infra/northbound/bgp-extensions/extension-common/pom.xml
index b6ea4cc72..0ea37b2b0 100644
--- a/infra/northbound/bgp-extensions/extension-common/pom.xml
+++ b/infra/northbound/bgp-extensions/extension-common/pom.xml
@@ -39,17 +39,17 @@
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>bgp-rib-spi</artifactId>
- <version>${bgpcep.version}</version>
+ <version>${odl.bgpcep.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>bgp-openconfig-api</artifactId>
- <version>${bgpcep.version}</version>
+ <version>${odl.bgpcep.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>bgp-openconfig-spi</artifactId>
- <version>${bgpcep.version}</version>
+ <version>${odl.bgpcep.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
@@ -72,7 +72,7 @@
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>bgp-parser-impl</artifactId>
- <version>${bgpcep.version}</version>
+ <version>${odl.bgpcep.version}</version>
</dependency>
</dependencies>
diff --git a/infra/northbound/bgp-extensions/inet/pom.xml b/infra/northbound/bgp-extensions/inet/pom.xml
index cc62cb9e2..b0194ca76 100644
--- a/infra/northbound/bgp-extensions/inet/pom.xml
+++ b/infra/northbound/bgp-extensions/inet/pom.xml
@@ -39,7 +39,7 @@
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>bgp-inet</artifactId>
- <version>${bgpcep.version}</version>
+ <version>${odl.bgpcep.version}</version>
</dependency>
<dependency>
<groupId>io.fd.honeycomb.northbound</groupId>
diff --git a/infra/northbound/bgp-extensions/l3-vpn-v4/pom.xml b/infra/northbound/bgp-extensions/l3-vpn-v4/pom.xml
index b88125e9c..663cd97d8 100644
--- a/infra/northbound/bgp-extensions/l3-vpn-v4/pom.xml
+++ b/infra/northbound/bgp-extensions/l3-vpn-v4/pom.xml
@@ -39,7 +39,7 @@
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>bgp-l3vpn</artifactId>
- <version>${bgpcep.version}</version>
+ <version>${odl.bgpcep.version}</version>
</dependency>
</dependencies>
diff --git a/infra/northbound/bgp-extensions/l3-vpn-v6/pom.xml b/infra/northbound/bgp-extensions/l3-vpn-v6/pom.xml
index ee6f675e5..d874d9fb1 100644
--- a/infra/northbound/bgp-extensions/l3-vpn-v6/pom.xml
+++ b/infra/northbound/bgp-extensions/l3-vpn-v6/pom.xml
@@ -39,7 +39,7 @@
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>bgp-l3vpn</artifactId>
- <version>${bgpcep.version}</version>
+ <version>${odl.bgpcep.version}</version>
</dependency>
</dependencies>
diff --git a/infra/northbound/bgp-extensions/labeled-unicast/pom.xml b/infra/northbound/bgp-extensions/labeled-unicast/pom.xml
index 8719e22f9..ed553a58a 100644
--- a/infra/northbound/bgp-extensions/labeled-unicast/pom.xml
+++ b/infra/northbound/bgp-extensions/labeled-unicast/pom.xml
@@ -38,7 +38,7 @@
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>bgp-labeled-unicast</artifactId>
- <version>${bgpcep.version}</version>
+ <version>${odl.bgpcep.version}</version>
</dependency>
<dependency>
<groupId>io.fd.honeycomb.northbound</groupId>
diff --git a/infra/northbound/bgp-extensions/linkstate/pom.xml b/infra/northbound/bgp-extensions/linkstate/pom.xml
index 0a674fa69..f159c2cf5 100644
--- a/infra/northbound/bgp-extensions/linkstate/pom.xml
+++ b/infra/northbound/bgp-extensions/linkstate/pom.xml
@@ -38,7 +38,7 @@
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>bgp-linkstate</artifactId>
- <version>${bgpcep.version}</version>
+ <version>${odl.bgpcep.version}</version>
</dependency>
<dependency>
<groupId>io.fd.honeycomb.northbound</groupId>
diff --git a/infra/northbound/bgp/pom.xml b/infra/northbound/bgp/pom.xml
index 66d08e739..355e66996 100644
--- a/infra/northbound/bgp/pom.xml
+++ b/infra/northbound/bgp/pom.xml
@@ -103,7 +103,7 @@
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>rsvp-api</artifactId>
- <version>${bgpcep.version}</version>
+ <version>${odl.bgpcep.version}</version>
</dependency>
</dependencies>
diff --git a/infra/northbound/netconf/pom.xml b/infra/northbound/netconf/pom.xml
index 1d42e25fe..a727446d5 100644
--- a/infra/northbound/netconf/pom.xml
+++ b/infra/northbound/netconf/pom.xml
@@ -55,7 +55,6 @@
<artifactId>binding-init</artifactId>
<version>${project.version}</version>
</dependency>
-
<dependency>
<groupId>io.fd.honeycomb</groupId>
<artifactId>minimal-distribution-core</artifactId>
diff --git a/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfSshServerProvider.java b/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfSshServerProvider.java
index bc1d95c09..d44b4f221 100644
--- a/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfSshServerProvider.java
+++ b/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfSshServerProvider.java
@@ -46,6 +46,11 @@ public final class NetconfSshServerProvider extends ProviderTrait<NetconfSshServ
private static final Logger LOG = LoggerFactory.getLogger(NetconfSshServerProvider.class);
+ // Use RSA for ssh server, see https://git.opendaylight.org/gerrit/#/c/60138/
+ private static final String DEFAULT_PRIVATE_KEY_PATH = null; // disable private key serialization
+ private static final String DEFAULT_ALGORITHM = "RSA";
+ private static final int DEFAULT_KEY_SIZE = 4096;
+
@Inject
private NetconfServerDispatcher dispatcher;
@Inject
@@ -65,6 +70,10 @@ public final class NetconfSshServerProvider extends ProviderTrait<NetconfSshServ
return null;
}
LOG.info("Starting NETCONF SSH");
+
+ // TODO(HONEYCOMB-414): the logic below is very similar to
+ // org.opendaylight.netconf.ssh.NetconfNorthboundSshServer (introduced in Carbon), so consider reusing it
+ // (requires fixing hardcoded private key path).
InetAddress sshBindingAddress = null;
try {
sshBindingAddress = InetAddress.getByName(cfgAttributes.netconfSshBindingAddress.get());
@@ -86,7 +95,8 @@ public final class NetconfSshServerProvider extends ProviderTrait<NetconfSshServ
// Only simple authProvider checking ConfigAttributes, checking the config file
sshConfigBuilder.setAuthenticator(new SimplelAuthProvider(credentialsCfg));
sshConfigBuilder.setIdleTimeout(Integer.MAX_VALUE);
- sshConfigBuilder.setKeyPairProvider(new PEMGeneratorHostKeyProvider());
+ sshConfigBuilder.setKeyPairProvider(new PEMGeneratorHostKeyProvider(DEFAULT_PRIVATE_KEY_PATH,
+ DEFAULT_ALGORITHM, DEFAULT_KEY_SIZE));
localServer.addListener(new SshServerBinder(sshProxyServer, sshConfigBuilder, bindingAddress));
diff --git a/infra/northbound/netconf/src/main/resources/honeycomb-minimal-resources/config/netconf-whitelist.xml b/infra/northbound/netconf/src/main/resources/honeycomb-minimal-resources/config/netconf-whitelist.xml
index 7b69a0253..371ee2b18 100644
--- a/infra/northbound/netconf/src/main/resources/honeycomb-minimal-resources/config/netconf-whitelist.xml
+++ b/infra/northbound/netconf/src/main/resources/honeycomb-minimal-resources/config/netconf-whitelist.xml
@@ -75,50 +75,6 @@
</module>
<module>
<package>
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.northbound.notification.rev150806
- </package>
- <description>
- This module contains the base YANG definitions for
- netconf northbound notifications API
-
- Directly used for netconf notification binding
- </description>
- </module>
- <module>
- <package>
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.protocol.framework.rev140313
- </package>
- <description>
- This module contains the base YANG definitions for
- protocol framework.
-
- Required for mounting of netconf devices(Operational read does not work without it)
- </description>
- </module>
- <module>
- <package>
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.north.mapper.rev150114
- </package>
- <description>
- This module contains the base YANG definitions for
- mapping services plugged into a netconf northbound server
-
- Required for mounting of netconf devices(Operational read does not work without it)
- </description>
- </module>
- <module>
- <package>
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.netconf.auth.rev150715
- </package>
- <description>
- This module contains the base YANG definitions for
- netconf northbound server API
-
- Required for mounting of netconf devices(Operational read does not work without it)
- </description>
- </module>
- <module>
- <package>
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.extension.rev131210
</package>
<description>
diff --git a/infra/northbound/restconf/pom.xml b/infra/northbound/restconf/pom.xml
index f5753d00c..ecff57459 100644
--- a/infra/northbound/restconf/pom.xml
+++ b/infra/northbound/restconf/pom.xml
@@ -54,7 +54,6 @@
<artifactId>binding-init</artifactId>
<version>${project.version}</version>
</dependency>
-
<dependency>
<groupId>io.fd.honeycomb</groupId>
<artifactId>minimal-distribution-core</artifactId>
diff --git a/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java b/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java
index d519a931d..ff338f1d9 100644
--- a/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java
+++ b/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2016, 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,8 +17,15 @@
package io.fd.honeycomb.northbound.restconf;
import com.google.inject.Inject;
+import com.google.inject.name.Named;
import io.fd.honeycomb.binding.init.ProviderTrait;
-import org.opendaylight.controller.sal.core.api.Broker;
+import io.fd.honeycomb.data.init.ShutdownHandler;
+import io.fd.honeycomb.infra.distro.data.ConfigAndOperationalPipelineModule;
+import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
+import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
+import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
+import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter;
+import org.opendaylight.controller.sal.core.api.model.SchemaService;
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.rev130715.PortNumber;
@@ -28,13 +35,29 @@ final class RestconfProvider extends ProviderTrait<RestConnector> {
@Inject
private RestconfConfiguration cfg;
@Inject
- private Broker domBroker;
+ @Named(ConfigAndOperationalPipelineModule.HONEYCOMB_CONFIG)
+ private DOMDataBroker domDataBroker;
+ @Inject
+ private SchemaService schemaService;
+ @Inject
+ private DOMRpcService rpcService;
+ @Inject
+ private DOMNotificationRouter notificationService;
+ @Inject
+ private ShutdownHandler shutdownHandler;
+ @Inject
+ private DOMMountPointService mountPointService;
@Override
protected RestconfProviderImpl create() {
- RestconfProviderImpl instance = new RestconfProviderImpl();
- instance.setWebsocketPort(new PortNumber(cfg.restconfWebsocketPort.get()));
- domBroker.registerProvider(instance);
+ final RestconfProviderImpl instance = new RestconfProviderImpl(domDataBroker, schemaService, rpcService,
+ notificationService, mountPointService, new PortNumber(cfg.restconfWebsocketPort.get()));
+
+ // Required to properly initialize restconf (broker, schema ctx, etc.).
+ // Without that restconf would fail with 503 (service not available).
+ instance.start();
+
+ shutdownHandler.register(instance.getClass().getCanonicalName(), instance);
return instance;
}
}
diff --git a/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/JsonUtilsTest.java b/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/JsonUtilsTest.java
index 9c97ac503..e1b2b3c0e 100644
--- a/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/JsonUtilsTest.java
+++ b/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/JsonUtilsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2016, 2017 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,9 +33,9 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor;
+import org.opendaylight.yangtools.yang.parser.stmt.reactor.EffectiveSchemaContext;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangInferencePipeline;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangStatementSourceImpl;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.EffectiveSchemaContext;
public class JsonUtilsTest {