From: Robert Varga Date: Sun, 4 Feb 2024 15:45:28 +0000 (+0100) Subject: Flatten callhome-provider X-Git-Tag: v7.0.0~58 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=650b026a0e3e0b8841ce336e752b3ac24fb9896d;p=netconf.git Flatten callhome-provider There is no point in separating components here -- flatten them to a single package. We may end up promoting some of these to netconf-client-mdsal and/or netconf-topology, but that is a separate story. JIRA: NETCONF-590 Change-Id: I1d8d96351b75965849d32028329716075c2da84c Signed-off-by: Robert Varga --- diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/AbstractCallHomeSessionContextManager.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/AbstractCallHomeSessionContextManager.java similarity index 87% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/AbstractCallHomeSessionContextManager.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/AbstractCallHomeSessionContextManager.java index 9839c9cf04..232d9cc6fd 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/AbstractCallHomeSessionContextManager.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/AbstractCallHomeSessionContextManager.java @@ -5,15 +5,14 @@ * 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.callhome.server; +package org.opendaylight.netconf.topology.callhome; -import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; public abstract class AbstractCallHomeSessionContextManager implements CallHomeSessionContextManager { - - protected final Map contexts = new ConcurrentHashMap<>(); + protected final ConcurrentMap contexts = new ConcurrentHashMap<>(); @Override public void register(final T context) { diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/AuthorizedKeysDecoder.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/AuthorizedKeysDecoder.java similarity index 99% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/AuthorizedKeysDecoder.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/AuthorizedKeysDecoder.java index 8779920967..e666ed1d1a 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/AuthorizedKeysDecoder.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/AuthorizedKeysDecoder.java @@ -5,7 +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.callhome.mount; +package org.opendaylight.netconf.topology.callhome; import com.google.common.collect.ImmutableMap; import java.io.ByteArrayOutputStream; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountService.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeMountService.java similarity index 94% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountService.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeMountService.java index 9086c978e7..7d3b7c0f8c 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountService.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeMountService.java @@ -5,7 +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.callhome.mount; +package org.opendaylight.netconf.topology.callhome; import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.ListenableFuture; @@ -20,12 +20,6 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.dom.api.DOMMountPointService; -import org.opendaylight.netconf.callhome.server.CallHomeStatusRecorder; -import org.opendaylight.netconf.callhome.server.ssh.CallHomeSshSessionContext; -import org.opendaylight.netconf.callhome.server.ssh.CallHomeSshSessionContextManager; -import org.opendaylight.netconf.callhome.server.tls.CallHomeTlsAuthProvider; -import org.opendaylight.netconf.callhome.server.tls.CallHomeTlsSessionContext; -import org.opendaylight.netconf.callhome.server.tls.CallHomeTlsSessionContextManager; import org.opendaylight.netconf.client.NetconfClientFactory; import org.opendaylight.netconf.client.NetconfClientSession; import org.opendaylight.netconf.client.NetconfClientSessionListener; @@ -92,8 +86,7 @@ import org.osgi.service.component.annotations.Reference; * *
    *
  • When incoming connection is identified the {@link CallHomeSshSessionContext} instance expected to be created. - * The createContext() method is invoked within protocol associated - * {@link org.opendaylight.netconf.callhome.server.CallHomeSessionContextManager CallHomeSessionContextManager} -- + * The createContext() method is invoked within protocol associated {@link CallHomeSessionContextManager} -- * see {@link #createSshSessionContextManager()} and * {@link #createTlsSessionContextManager(CallHomeTlsAuthProvider, CallHomeStatusRecorder)}
  • *
  • Due to both {@link NetconfClientSessionListener} and {@link SettableFuture} are required to build session @@ -101,8 +94,7 @@ import org.osgi.service.component.annotations.Reference; * composed via {@link #asNode(String, SocketAddress, Protocol)}. This triggers Netconf client construct/connect * logic (as explained above) resulting captured object placed into {@link #netconfLayerMapping}.
  • *
  • Accepted instance of {@link NetconfClientSessionListener} is used to establish Netconf layer -- - * see {@link org.opendaylight.netconf.callhome.server.CallHomeTransportChannelListener - * CallHomeTransportChannelListener}
  • + * see {@link CallHomeTransportChannelListener} *
  • Accepted instance of {@link SettableFuture} (representing connection to remote device) is used to * signal connection state to topology component
  • *
diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountSshAuthProvider.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeMountSshAuthProvider.java similarity index 98% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountSshAuthProvider.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeMountSshAuthProvider.java index a3471aeb69..b17e8edb4b 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountSshAuthProvider.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeMountSshAuthProvider.java @@ -5,7 +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.callhome.mount; +package org.opendaylight.netconf.topology.callhome; import java.io.IOException; import java.net.InetSocketAddress; @@ -24,8 +24,6 @@ import org.opendaylight.mdsal.binding.api.DataTreeChangeListener; import org.opendaylight.mdsal.binding.api.DataTreeIdentifier; import org.opendaylight.mdsal.binding.api.DataTreeModification; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; -import org.opendaylight.netconf.callhome.server.ssh.CallHomeSshAuthProvider; -import org.opendaylight.netconf.callhome.server.ssh.CallHomeSshAuthSettings; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netconf.callhome.server.rev240129.NetconfCallhomeServer; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netconf.callhome.server.rev240129.SshPublicKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netconf.callhome.server.rev240129.credentials.Credentials; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountStatusReporter.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeMountStatusReporter.java similarity index 98% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountStatusReporter.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeMountStatusReporter.java index c479a69505..c69ef4b58b 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountStatusReporter.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeMountStatusReporter.java @@ -5,7 +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.callhome.mount; +package org.opendaylight.netconf.topology.callhome; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.FutureCallback; @@ -24,7 +24,6 @@ import org.opendaylight.mdsal.binding.api.DataTreeIdentifier; import org.opendaylight.mdsal.binding.api.DataTreeModification; import org.opendaylight.mdsal.common.api.CommitInfo; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; -import org.opendaylight.netconf.callhome.server.CallHomeStatusRecorder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netconf.callhome.server.rev240129.NetconfCallhomeServer; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netconf.callhome.server.rev240129.SshPublicKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netconf.callhome.server.rev240129.netconf.callhome.server.AllowedDevices; @@ -60,7 +59,7 @@ public final class CallHomeMountStatusReporter implements CallHomeStatusRecorder @Inject public CallHomeMountStatusReporter(final @Reference DataBroker broker) { dataBroker = broker; - syncReg = dataBroker.registerDataTreeChangeListener( + syncReg = dataBroker.registerLegacyTreeChangeListener( DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, ALL_DEVICES_II.child(Device.class)), this::onConfigurationDataTreeChanged); } diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/tls/CallHomeMountTlsAuthProvider.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeMountTlsAuthProvider.java similarity index 98% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/tls/CallHomeMountTlsAuthProvider.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeMountTlsAuthProvider.java index 0eb6c9d854..1a2d469b1e 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/tls/CallHomeMountTlsAuthProvider.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeMountTlsAuthProvider.java @@ -5,7 +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.callhome.mount.tls; +package org.opendaylight.netconf.topology.callhome; import com.google.common.collect.ImmutableMultimap; import io.netty.handler.ssl.SslContext; @@ -24,7 +24,6 @@ import org.opendaylight.mdsal.binding.api.DataTreeChangeListener; import org.opendaylight.mdsal.binding.api.DataTreeIdentifier; import org.opendaylight.mdsal.binding.api.DataTreeModification; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; -import org.opendaylight.netconf.callhome.server.tls.CallHomeTlsAuthProvider; import org.opendaylight.netconf.client.SslContextFactory; import org.opendaylight.netconf.client.mdsal.api.SslContextFactoryProvider; import org.opendaylight.netconf.keystore.legacy.NetconfKeystore; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeSessionContext.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSessionContext.java similarity index 96% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeSessionContext.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSessionContext.java index cf28f55410..28d95f528e 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeSessionContext.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSessionContext.java @@ -5,7 +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.callhome.server; +package org.opendaylight.netconf.topology.callhome; import com.google.common.util.concurrent.SettableFuture; import org.opendaylight.netconf.client.NetconfClientSession; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeSessionContextManager.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSessionContextManager.java similarity index 97% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeSessionContextManager.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSessionContextManager.java index 875cc2f581..172311fa2f 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeSessionContextManager.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSessionContextManager.java @@ -5,7 +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.callhome.server; +package org.opendaylight.netconf.topology.callhome; import io.netty.channel.Channel; import org.eclipse.jdt.annotation.NonNull; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshAuthProvider.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshAuthProvider.java similarity index 95% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshAuthProvider.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshAuthProvider.java index 6d0fd78e4b..2e74142980 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshAuthProvider.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshAuthProvider.java @@ -5,7 +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.callhome.server.ssh; +package org.opendaylight.netconf.topology.callhome; import java.net.SocketAddress; import java.security.PublicKey; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshAuthSettings.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshAuthSettings.java similarity index 97% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshAuthSettings.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshAuthSettings.java index a76c2fee92..b93a37ead9 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshAuthSettings.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshAuthSettings.java @@ -5,7 +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.callhome.server.ssh; +package org.opendaylight.netconf.topology.callhome; import static java.util.Objects.requireNonNull; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshServer.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshServer.java similarity index 98% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshServer.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshServer.java index 5708f5d448..d51abd8beb 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshServer.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshServer.java @@ -5,7 +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.callhome.server.ssh; +package org.opendaylight.netconf.topology.callhome; import static java.util.Objects.requireNonNull; @@ -19,8 +19,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.netconf.api.TransportConstants; -import org.opendaylight.netconf.callhome.server.CallHomeStatusRecorder; -import org.opendaylight.netconf.callhome.server.CallHomeTransportChannelListener; import org.opendaylight.netconf.client.NetconfClientSessionNegotiatorFactory; import org.opendaylight.netconf.shaded.sshd.client.auth.password.UserAuthPasswordFactory; import org.opendaylight.netconf.shaded.sshd.client.auth.pubkey.UserAuthPublicKeyFactory; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshSessionContext.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshSessionContext.java similarity index 92% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshSessionContext.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshSessionContext.java index 564e47f738..2514d386f9 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshSessionContext.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshSessionContext.java @@ -5,14 +5,13 @@ * 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.callhome.server.ssh; +package org.opendaylight.netconf.topology.callhome; import static java.util.Objects.requireNonNull; import com.google.common.base.MoreObjects; import com.google.common.util.concurrent.SettableFuture; import java.net.SocketAddress; -import org.opendaylight.netconf.callhome.server.CallHomeSessionContext; import org.opendaylight.netconf.client.NetconfClientSession; import org.opendaylight.netconf.client.NetconfClientSessionListener; import org.opendaylight.netconf.shaded.sshd.client.session.ClientSession; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshSessionContextManager.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshSessionContextManager.java similarity index 94% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshSessionContextManager.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshSessionContextManager.java index 0c69d6930e..ae4b3d7808 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshSessionContextManager.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeSshSessionContextManager.java @@ -5,7 +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.callhome.server.ssh; +package org.opendaylight.netconf.topology.callhome; import static java.util.Objects.requireNonNull; @@ -14,7 +14,6 @@ import io.netty.channel.Channel; import java.net.SocketAddress; import java.util.Map; import org.eclipse.jdt.annotation.Nullable; -import org.opendaylight.netconf.callhome.server.AbstractCallHomeSessionContextManager; import org.opendaylight.netconf.client.SimpleNetconfClientSessionListener; import org.opendaylight.netconf.shaded.sshd.client.session.ClientSession; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeStatusRecorder.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeStatusRecorder.java similarity index 97% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeStatusRecorder.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeStatusRecorder.java index 79c813310e..72c5e9164f 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeStatusRecorder.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeStatusRecorder.java @@ -5,7 +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.callhome.server; +package org.opendaylight.netconf.topology.callhome; import java.net.SocketAddress; import java.security.PublicKey; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsAuthProvider.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsAuthProvider.java similarity index 92% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsAuthProvider.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsAuthProvider.java index a161b18349..e0d29cbded 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsAuthProvider.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsAuthProvider.java @@ -5,7 +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.callhome.server.tls; +package org.opendaylight.netconf.topology.callhome; import java.security.PublicKey; import org.eclipse.jdt.annotation.NonNull; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsServer.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsServer.java similarity index 96% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsServer.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsServer.java index 4fccee7566..b249a2e198 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsServer.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsServer.java @@ -5,7 +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.callhome.server.tls; +package org.opendaylight.netconf.topology.callhome; import static java.util.Objects.requireNonNull; @@ -15,8 +15,6 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.eclipse.jdt.annotation.NonNull; -import org.opendaylight.netconf.callhome.server.CallHomeStatusRecorder; -import org.opendaylight.netconf.callhome.server.CallHomeTransportChannelListener; import org.opendaylight.netconf.client.NetconfClientSessionNegotiatorFactory; import org.opendaylight.netconf.transport.api.UnsupportedConfigurationException; import org.opendaylight.netconf.transport.tcp.BootstrapFactory; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsSessionContext.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsSessionContext.java similarity index 91% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsSessionContext.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsSessionContext.java index 221949e763..c3a038ae87 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsSessionContext.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsSessionContext.java @@ -5,14 +5,13 @@ * 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.callhome.server.tls; +package org.opendaylight.netconf.topology.callhome; import static java.util.Objects.requireNonNull; import com.google.common.base.MoreObjects; import com.google.common.util.concurrent.SettableFuture; import io.netty.channel.Channel; -import org.opendaylight.netconf.callhome.server.CallHomeSessionContext; import org.opendaylight.netconf.client.NetconfClientSession; import org.opendaylight.netconf.client.NetconfClientSessionListener; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsSessionContextManager.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsSessionContextManager.java similarity index 94% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsSessionContextManager.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsSessionContextManager.java index 9a3fee6282..0e33831b52 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsSessionContextManager.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsSessionContextManager.java @@ -5,7 +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.callhome.server.tls; +package org.opendaylight.netconf.topology.callhome; import static java.util.Objects.requireNonNull; @@ -14,8 +14,6 @@ import io.netty.channel.Channel; import io.netty.handler.ssl.SslHandler; import java.security.PublicKey; import javax.net.ssl.SSLPeerUnverifiedException; -import org.opendaylight.netconf.callhome.server.AbstractCallHomeSessionContextManager; -import org.opendaylight.netconf.callhome.server.CallHomeStatusRecorder; import org.opendaylight.netconf.client.SimpleNetconfClientSessionListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeTopology.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTopology.java similarity index 97% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeTopology.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTopology.java index 2606467a6e..b9cf85a9a5 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeTopology.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTopology.java @@ -5,7 +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.callhome.mount; +package org.opendaylight.netconf.topology.callhome; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.dom.api.DOMMountPointService; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeTransportChannelListener.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTransportChannelListener.java similarity index 98% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeTransportChannelListener.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTransportChannelListener.java index 54d9a05768..12e446c39f 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeTransportChannelListener.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/CallHomeTransportChannelListener.java @@ -5,7 +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.callhome.server; +package org.opendaylight.netconf.topology.callhome; import static java.util.Objects.requireNonNull; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/IetfZeroTouchCallHomeServerProvider.java similarity index 92% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/IetfZeroTouchCallHomeServerProvider.java index 89d05b64a4..571e86ae78 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/IetfZeroTouchCallHomeServerProvider.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/IetfZeroTouchCallHomeServerProvider.java @@ -5,16 +5,13 @@ * 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.callhome.mount; +package org.opendaylight.netconf.topology.callhome; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Optional; import javax.inject.Inject; import javax.inject.Singleton; -import org.opendaylight.netconf.callhome.server.CallHomeStatusRecorder; -import org.opendaylight.netconf.callhome.server.ssh.CallHomeSshAuthProvider; -import org.opendaylight.netconf.callhome.server.ssh.CallHomeSshServer; import org.opendaylight.netconf.client.NetconfClientSessionNegotiatorFactory; import org.opendaylight.netconf.common.NetconfTimer; import org.osgi.service.component.annotations.Activate; diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/tls/NetconfCallHomeTlsService.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/NetconfCallHomeTlsService.java similarity index 90% rename from apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/tls/NetconfCallHomeTlsService.java rename to apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/NetconfCallHomeTlsService.java index 9a8a3a076e..ae23d84e35 100644 --- a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/tls/NetconfCallHomeTlsService.java +++ b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/topology/callhome/NetconfCallHomeTlsService.java @@ -5,17 +5,13 @@ * 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.callhome.mount.tls; +package org.opendaylight.netconf.topology.callhome; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Optional; import javax.inject.Inject; import javax.inject.Singleton; -import org.opendaylight.netconf.callhome.mount.CallHomeMountService; -import org.opendaylight.netconf.callhome.server.CallHomeStatusRecorder; -import org.opendaylight.netconf.callhome.server.tls.CallHomeTlsAuthProvider; -import org.opendaylight.netconf.callhome.server.tls.CallHomeTlsServer; import org.opendaylight.netconf.client.NetconfClientSessionNegotiatorFactory; import org.opendaylight.netconf.common.NetconfTimer; import org.osgi.service.component.annotations.Activate; diff --git a/apps/callhome-provider/src/test/java/org/opendaylight/netconf/callhome/mount/CallHomeMountServiceTest.java b/apps/callhome-provider/src/test/java/org/opendaylight/netconf/topology/callhome/CallHomeMountServiceTest.java similarity index 96% rename from apps/callhome-provider/src/test/java/org/opendaylight/netconf/callhome/mount/CallHomeMountServiceTest.java rename to apps/callhome-provider/src/test/java/org/opendaylight/netconf/topology/callhome/CallHomeMountServiceTest.java index 51f52cb4fc..27b3d0bd9b 100644 --- a/apps/callhome-provider/src/test/java/org/opendaylight/netconf/callhome/mount/CallHomeMountServiceTest.java +++ b/apps/callhome-provider/src/test/java/org/opendaylight/netconf/topology/callhome/CallHomeMountServiceTest.java @@ -5,7 +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.callhome.mount; +package org.opendaylight.netconf.topology.callhome; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -28,8 +28,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import org.opendaylight.netconf.callhome.server.CallHomeStatusRecorder; -import org.opendaylight.netconf.callhome.server.tls.CallHomeTlsAuthProvider; import org.opendaylight.netconf.client.NetconfClientSession; import org.opendaylight.netconf.client.NetconfClientSessionListener; import org.opendaylight.netconf.shaded.sshd.client.session.ClientSession; diff --git a/apps/callhome-provider/src/test/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshServerTest.java b/apps/callhome-provider/src/test/java/org/opendaylight/netconf/topology/callhome/CallHomeSshServerTest.java similarity index 98% rename from apps/callhome-provider/src/test/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshServerTest.java rename to apps/callhome-provider/src/test/java/org/opendaylight/netconf/topology/callhome/CallHomeSshServerTest.java index 95527aabe6..aa327d4381 100644 --- a/apps/callhome-provider/src/test/java/org/opendaylight/netconf/callhome/server/ssh/CallHomeSshServerTest.java +++ b/apps/callhome-provider/src/test/java/org/opendaylight/netconf/topology/callhome/CallHomeSshServerTest.java @@ -5,7 +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.callhome.server.ssh; +package org.opendaylight.netconf.topology.callhome; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; @@ -33,8 +33,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import org.opendaylight.netconf.callhome.server.CallHomeStatusRecorder; -import org.opendaylight.netconf.callhome.server.ssh.CallHomeSshAuthSettings.DefaultAuthSettings; import org.opendaylight.netconf.client.NetconfClientSession; import org.opendaylight.netconf.client.NetconfClientSessionListener; import org.opendaylight.netconf.client.NetconfClientSessionNegotiatorFactory; @@ -52,6 +50,7 @@ import org.opendaylight.netconf.shaded.sshd.server.auth.password.PasswordAuthent import org.opendaylight.netconf.shaded.sshd.server.auth.password.UserAuthPasswordFactory; import org.opendaylight.netconf.shaded.sshd.server.auth.pubkey.PublickeyAuthenticator; import org.opendaylight.netconf.shaded.sshd.server.auth.pubkey.UserAuthPublicKeyFactory; +import org.opendaylight.netconf.topology.callhome.CallHomeSshAuthSettings.DefaultAuthSettings; import org.opendaylight.netconf.transport.ssh.SSHServer; import org.opendaylight.netconf.transport.ssh.SSHTransportStackFactory; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Host; diff --git a/apps/callhome-provider/src/test/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsServerTest.java b/apps/callhome-provider/src/test/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsServerTest.java similarity index 99% rename from apps/callhome-provider/src/test/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsServerTest.java rename to apps/callhome-provider/src/test/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsServerTest.java index 54a7303e3c..5e15ef2cbe 100644 --- a/apps/callhome-provider/src/test/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsServerTest.java +++ b/apps/callhome-provider/src/test/java/org/opendaylight/netconf/topology/callhome/CallHomeTlsServerTest.java @@ -5,7 +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.callhome.server.tls; +package org.opendaylight.netconf.topology.callhome; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; @@ -53,7 +53,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import org.opendaylight.netconf.callhome.server.CallHomeStatusRecorder; import org.opendaylight.netconf.client.NetconfClientSession; import org.opendaylight.netconf.client.NetconfClientSessionListener; import org.opendaylight.netconf.client.NetconfClientSessionNegotiatorFactory;