Require a subsystem for client connections 96/108396/8
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 13 Oct 2023 12:13:50 +0000 (14:13 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 13 Oct 2023 18:38:53 +0000 (20:38 +0200)
commitd901d1c6fb1adb2aa88639437c49d26efd3bba5e
tree4eb0af44b532ffce44a4cb3cb4ea6f4969a73e13
parent825428cba39c2acf83cfe0a1fc2d90511d6c5ddc
Require a subsystem for client connections

SSHClient does not really operate on the raw session, hence we should
not report it as set up after authentication.

Each client is connected to a particular SSH subsystem, and hence we
require the desired name (for example "netconf", but can be anything).

Once we complete authentication, we request the specified subsystem.
When the subsystem is open, we attach it to the Netty channel and only
then do we report the SSHClient to be up.

JIRA: NETCONF-1108
Change-Id: I9210b2924a9b8239161c8f4c649db3677e63b5b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
protocol/netconf-server/src/test/java/org/opendaylight/netconf/server/NetconfServerFactoryImplTest.java
transport/transport-ssh/pom.xml
transport/transport-ssh/src/main/java/org/opendaylight/netconf/transport/ssh/SSHClient.java
transport/transport-ssh/src/main/java/org/opendaylight/netconf/transport/ssh/SSHServer.java
transport/transport-ssh/src/main/java/org/opendaylight/netconf/transport/ssh/SSHTransportStack.java
transport/transport-ssh/src/main/java/org/opendaylight/netconf/transport/ssh/SSHTransportStackFactory.java
transport/transport-ssh/src/main/java/org/opendaylight/netconf/transport/ssh/TransportClientSession.java [new file with mode: 0644]
transport/transport-ssh/src/main/java/org/opendaylight/netconf/transport/ssh/TransportClientSessionFactory.java [new file with mode: 0644]
transport/transport-ssh/src/main/java/org/opendaylight/netconf/transport/ssh/TransportClientSubsystem.java [new file with mode: 0644]
transport/transport-ssh/src/main/java/org/opendaylight/netconf/transport/ssh/TransportSshClient.java
transport/transport-ssh/src/test/java/org/opendaylight/netconf/transport/ssh/SshClientServerTest.java