diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2017-11-07 09:21:08 +0100 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2017-11-10 10:00:39 +0100 |
commit | 0f92e8f1eb7ec29f589ed92c55b049f13cce0f30 (patch) | |
tree | 30e7fa6562a136755f1e5a9e5348db51c221f59b /infra/northbound | |
parent | cccd174ab736465bc36faacfeaa30297acb724a7 (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>
Diffstat (limited to 'infra/northbound')
13 files changed, 51 insertions, 64 deletions
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; } } |