* 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<T extends CallHomeSessionContext>
implements CallHomeSessionContextManager<T> {
-
- protected final Map<String, T> contexts = new ConcurrentHashMap<>();
+ protected final ConcurrentMap<String, T> contexts = new ConcurrentHashMap<>();
@Override
public void register(final T context) {
* 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;
* 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;
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;
*
* <ul>
* <li>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)}</li>
* <li>Due to both {@link NetconfClientSessionListener} and {@link SettableFuture} are required to build session
* composed via {@link #asNode(String, SocketAddress, Protocol)}. This triggers Netconf client construct/connect
* logic (as explained above) resulting captured object placed into {@link #netconfLayerMapping}.</li>
* <li>Accepted instance of {@link NetconfClientSessionListener} is used to establish Netconf layer --
- * see {@link org.opendaylight.netconf.callhome.server.CallHomeTransportChannelListener
- * CallHomeTransportChannelListener} </li>
+ * see {@link CallHomeTransportChannelListener}</li>
* <li>Accepted instance of {@link SettableFuture} (representing connection to remote device) is used to
* signal connection state to topology component</li>
* </ul>
* 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;
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;
* 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;
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;
@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);
}
* 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;
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;
* 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;
* 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;
* 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;
* 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;
* 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 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;
* 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;
* 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 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;
* 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;
* 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;
* 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 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;
* 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;
* 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 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;
* 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;
* 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;
* 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;
* 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;
* 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;
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;
* 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;
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;
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;
* 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;
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;