Eliminate org.opendaylight.netconf.sal.connect.netconf.auth 97/105797/7
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 2 May 2023 22:44:58 +0000 (00:44 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 3 May 2023 09:48:49 +0000 (11:48 +0200)
This is mostly a useless package, move its sole occupant to
netconf.cliuent.mdsal.

JIRA: NETCONF-1006
Change-Id: Ib17b511b662fbd4d59487da1ab075c1391bfc219
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
apps/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/RemoteDeviceConnectorImpl.java
apps/netconf-topology/src/main/java/org/opendaylight/netconf/topology/spi/AbstractNetconfTopology.java
plugins/netconf-client-mdsal/src/main/java/org/opendaylight/netconf/client/mdsal/DatastoreBackedPublicKeyAuth.java [moved from plugins/netconf-client-mdsal/src/main/java/org/opendaylight/netconf/sal/connect/netconf/auth/DatastoreBackedPublicKeyAuth.java with 94% similarity]

index 2c77cf32ba1441c557a2f88627a290f908955394..16c68c12a3ac01c135ce08a26b8fd357923aebc7 100644 (file)
@@ -25,6 +25,7 @@ import org.opendaylight.netconf.client.NetconfClientSessionListener;
 import org.opendaylight.netconf.client.conf.NetconfClientConfiguration;
 import org.opendaylight.netconf.client.conf.NetconfReconnectingClientConfiguration;
 import org.opendaylight.netconf.client.conf.NetconfReconnectingClientConfigurationBuilder;
+import org.opendaylight.netconf.client.mdsal.DatastoreBackedPublicKeyAuth;
 import org.opendaylight.netconf.client.mdsal.LibraryModulesSchemas;
 import org.opendaylight.netconf.client.mdsal.NetconfDevice;
 import org.opendaylight.netconf.client.mdsal.NetconfDeviceBuilder;
@@ -37,7 +38,6 @@ import org.opendaylight.netconf.nettyutil.ReconnectStrategyFactory;
 import org.opendaylight.netconf.nettyutil.TimedReconnectStrategyFactory;
 import org.opendaylight.netconf.nettyutil.handler.ssh.authentication.AuthenticationHandler;
 import org.opendaylight.netconf.nettyutil.handler.ssh.authentication.LoginPasswordHandler;
-import org.opendaylight.netconf.sal.connect.netconf.auth.DatastoreBackedPublicKeyAuth;
 import org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator;
 import org.opendaylight.netconf.sal.connect.netconf.sal.KeepaliveSalFacade;
 import org.opendaylight.netconf.sal.connect.netconf.sal.NetconfKeystoreAdapter;
index 93ed45f4f0785bc1acad9f1629d0867e57462c2a..d0ba57bc92d687673f1a61a064ee740395ef28ec 100644 (file)
@@ -34,6 +34,7 @@ import org.opendaylight.netconf.client.NetconfClientSessionListener;
 import org.opendaylight.netconf.client.conf.NetconfClientConfiguration;
 import org.opendaylight.netconf.client.conf.NetconfReconnectingClientConfiguration;
 import org.opendaylight.netconf.client.conf.NetconfReconnectingClientConfigurationBuilder;
+import org.opendaylight.netconf.client.mdsal.DatastoreBackedPublicKeyAuth;
 import org.opendaylight.netconf.client.mdsal.LibraryModulesSchemas;
 import org.opendaylight.netconf.client.mdsal.NetconfDevice.SchemaResourcesDTO;
 import org.opendaylight.netconf.client.mdsal.NetconfDeviceBuilder;
@@ -47,7 +48,6 @@ import org.opendaylight.netconf.nettyutil.ReconnectStrategyFactory;
 import org.opendaylight.netconf.nettyutil.TimedReconnectStrategyFactory;
 import org.opendaylight.netconf.nettyutil.handler.ssh.authentication.AuthenticationHandler;
 import org.opendaylight.netconf.nettyutil.handler.ssh.authentication.LoginPasswordHandler;
-import org.opendaylight.netconf.sal.connect.netconf.auth.DatastoreBackedPublicKeyAuth;
 import org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator;
 import org.opendaylight.netconf.sal.connect.netconf.sal.KeepaliveSalFacade;
 import org.opendaylight.netconf.sal.connect.netconf.sal.NetconfKeystoreAdapter;
@@ -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.sal.connect.netconf.auth;
+package org.opendaylight.netconf.client.mdsal;
 
 import com.google.common.base.Strings;
 import java.io.IOException;
@@ -22,8 +22,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.keystore.rev171017.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class DatastoreBackedPublicKeyAuth extends AuthenticationHandler {
-
+public final class DatastoreBackedPublicKeyAuth extends AuthenticationHandler {
     private static final Logger LOG = LoggerFactory.getLogger(DatastoreBackedPublicKeyAuth.class);
 
     private final String username;
@@ -31,6 +30,7 @@ public class DatastoreBackedPublicKeyAuth extends AuthenticationHandler {
     private final NetconfKeystoreAdapter keystoreAdapter;
     private final AAAEncryptionService encryptionService;
 
+    // FIXME: do not use Optional here and deal with atomic set
     private Optional<KeyPair> keyPair = Optional.empty();
 
     public DatastoreBackedPublicKeyAuth(final String username, final String pairId,