From 62af7afbdacc64dd99c3d0b77c629eca2d5d8284 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 26 Apr 2023 19:09:33 +0200 Subject: [PATCH] Move NetconfServerDispatcher to netconf.server.api There is no point in polluting netconf-api with server-side constructs, this move takes the first step in sanitizing the dependency tree. Unfortunately we cannot move NetconfServerDispatcherImpl, as it is tied down by mdsal-netconf-impl's configuration compatibility constraints (i.e. the configuration is tied to NetconfMonitoringServiceImpl). JIRA: NETCONF-945 Change-Id: I0d1b3631d2af50ca7291bfca06a9ddd490c26a71 Signed-off-by: Robert Varga --- .../netconf/impl/mdsal/DefaultNetconfServerDispatcher.java | 2 +- netconf/mdsal-netconf-ssh/pom.xml | 4 ++++ .../opendaylight/netconf/ssh/NetconfNorthboundSshServer.java | 2 +- netconf/mdsal-netconf-tcp/pom.xml | 2 +- .../opendaylight/netconf/tcp/NetconfNorthboundTcpServer.java | 2 +- .../netconf/server/NetconfServerDispatcherImpl.java | 2 +- .../netconf/server}/api/NetconfServerDispatcher.java | 3 +-- 7 files changed, 10 insertions(+), 7 deletions(-) rename protocol/{netconf-api/src/main/java/org/opendaylight/netconf => netconf-server/src/main/java/org/opendaylight/netconf/server}/api/NetconfServerDispatcher.java (92%) diff --git a/netconf/mdsal-netconf-impl/src/main/java/org/opendaylight/netconf/impl/mdsal/DefaultNetconfServerDispatcher.java b/netconf/mdsal-netconf-impl/src/main/java/org/opendaylight/netconf/impl/mdsal/DefaultNetconfServerDispatcher.java index a1edec19ee..1a57fd33cc 100644 --- a/netconf/mdsal-netconf-impl/src/main/java/org/opendaylight/netconf/impl/mdsal/DefaultNetconfServerDispatcher.java +++ b/netconf/mdsal-netconf-impl/src/main/java/org/opendaylight/netconf/impl/mdsal/DefaultNetconfServerDispatcher.java @@ -11,9 +11,9 @@ import static java.util.Objects.requireNonNull; import io.netty.channel.EventLoopGroup; import java.util.Map; -import org.opendaylight.netconf.api.NetconfServerDispatcher; import org.opendaylight.netconf.server.NetconfServerDispatcherImpl; import org.opendaylight.netconf.server.ServerChannelInitializer; +import org.opendaylight.netconf.server.api.NetconfServerDispatcher; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; diff --git a/netconf/mdsal-netconf-ssh/pom.xml b/netconf/mdsal-netconf-ssh/pom.xml index bd0837b5ee..ddd7e39751 100644 --- a/netconf/mdsal-netconf-ssh/pom.xml +++ b/netconf/mdsal-netconf-ssh/pom.xml @@ -53,6 +53,10 @@ org.opendaylight.netconf netconf-netty-util + + org.opendaylight.netconf + netconf-server + org.opendaylight.netconf shaded-sshd diff --git a/netconf/mdsal-netconf-ssh/src/main/java/org/opendaylight/netconf/ssh/NetconfNorthboundSshServer.java b/netconf/mdsal-netconf-ssh/src/main/java/org/opendaylight/netconf/ssh/NetconfNorthboundSshServer.java index 80916d3918..da8fd6410a 100644 --- a/netconf/mdsal-netconf-ssh/src/main/java/org/opendaylight/netconf/ssh/NetconfNorthboundSshServer.java +++ b/netconf/mdsal-netconf-ssh/src/main/java/org/opendaylight/netconf/ssh/NetconfNorthboundSshServer.java @@ -14,8 +14,8 @@ import io.netty.util.concurrent.EventExecutor; import java.io.IOException; import java.net.InetSocketAddress; import java.util.concurrent.Executors; -import org.opendaylight.netconf.api.NetconfServerDispatcher; import org.opendaylight.netconf.auth.AuthProvider; +import org.opendaylight.netconf.server.api.NetconfServerDispatcher; import org.opendaylight.netconf.shaded.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IetfInetUtil; import org.osgi.service.component.annotations.Activate; diff --git a/netconf/mdsal-netconf-tcp/pom.xml b/netconf/mdsal-netconf-tcp/pom.xml index d5b9b928fa..6993c94cbb 100644 --- a/netconf/mdsal-netconf-tcp/pom.xml +++ b/netconf/mdsal-netconf-tcp/pom.xml @@ -35,7 +35,7 @@ org.opendaylight.netconf - netconf-api + netconf-server org.osgi diff --git a/netconf/mdsal-netconf-tcp/src/main/java/org/opendaylight/netconf/tcp/NetconfNorthboundTcpServer.java b/netconf/mdsal-netconf-tcp/src/main/java/org/opendaylight/netconf/tcp/NetconfNorthboundTcpServer.java index 7e8a1d0fbe..b1fe4a48d2 100644 --- a/netconf/mdsal-netconf-tcp/src/main/java/org/opendaylight/netconf/tcp/NetconfNorthboundTcpServer.java +++ b/netconf/mdsal-netconf-tcp/src/main/java/org/opendaylight/netconf/tcp/NetconfNorthboundTcpServer.java @@ -9,7 +9,7 @@ package org.opendaylight.netconf.tcp; import io.netty.channel.ChannelFuture; import java.net.InetSocketAddress; -import org.opendaylight.netconf.api.NetconfServerDispatcher; +import org.opendaylight.netconf.server.api.NetconfServerDispatcher; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IetfInetUtil; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; diff --git a/protocol/netconf-server/src/main/java/org/opendaylight/netconf/server/NetconfServerDispatcherImpl.java b/protocol/netconf-server/src/main/java/org/opendaylight/netconf/server/NetconfServerDispatcherImpl.java index 70a2c91cb1..1caee81d39 100644 --- a/protocol/netconf-server/src/main/java/org/opendaylight/netconf/server/NetconfServerDispatcherImpl.java +++ b/protocol/netconf-server/src/main/java/org/opendaylight/netconf/server/NetconfServerDispatcherImpl.java @@ -12,8 +12,8 @@ import io.netty.channel.EventLoopGroup; import io.netty.channel.local.LocalAddress; import io.netty.channel.local.LocalServerChannel; import java.net.InetSocketAddress; -import org.opendaylight.netconf.api.NetconfServerDispatcher; import org.opendaylight.netconf.nettyutil.AbstractNetconfDispatcher; +import org.opendaylight.netconf.server.api.NetconfServerDispatcher; public class NetconfServerDispatcherImpl extends AbstractNetconfDispatcher implements NetconfServerDispatcher { diff --git a/protocol/netconf-api/src/main/java/org/opendaylight/netconf/api/NetconfServerDispatcher.java b/protocol/netconf-server/src/main/java/org/opendaylight/netconf/server/api/NetconfServerDispatcher.java similarity index 92% rename from protocol/netconf-api/src/main/java/org/opendaylight/netconf/api/NetconfServerDispatcher.java rename to protocol/netconf-server/src/main/java/org/opendaylight/netconf/server/api/NetconfServerDispatcher.java index b2775fd1e7..9153fe9461 100644 --- a/protocol/netconf-api/src/main/java/org/opendaylight/netconf/api/NetconfServerDispatcher.java +++ b/protocol/netconf-server/src/main/java/org/opendaylight/netconf/server/api/NetconfServerDispatcher.java @@ -5,8 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - -package org.opendaylight.netconf.api; +package org.opendaylight.netconf.server.api; import io.netty.channel.ChannelFuture; import io.netty.channel.local.LocalAddress; -- 2.36.6