On Fri, Jul 25, 2025 at 11:15 AM Luca Vizzarro wrote: > Merge the RemoteSession class with SSHSession as there is no current use > of a separate channel other than SSH. > > Signed-off-by: Luca Vizzarro > Reviewed-by: Paul Szczepanek > --- > doc/api/dts/framework.remote_session.rst | 1 - > .../framework.remote_session.ssh_session.rst | 8 -- > dts/framework/remote_session/__init__.py | 3 +- > .../remote_session/remote_session.py | 110 ++++++++++++----- > dts/framework/remote_session/ssh_session.py | 116 ------------------ > 5 files changed, 79 insertions(+), 159 deletions(-) > delete mode 100644 doc/api/dts/framework.remote_session.ssh_session.rst > delete mode 100644 dts/framework/remote_session/ssh_session.py > > diff --git a/doc/api/dts/framework.remote_session.rst > b/doc/api/dts/framework.remote_session.rst > index 27c9153e64..e4ebd21ab9 100644 > --- a/doc/api/dts/framework.remote_session.rst > +++ b/doc/api/dts/framework.remote_session.rst > @@ -12,7 +12,6 @@ remote\_session - Node Connections Package > :maxdepth: 1 > > -class RemoteSession(ABC): > +class RemoteSession: > """Non-interactive remote session. > > - The abstract methods must be implemented in order to connect to a > remote host (node) > - and maintain a remote session. > - The subclasses must use (or implement) some underlying transport > protocol (e.g. SSH) > - to implement the methods. On top of that, it provides some basic > services common to all > - subclasses, such as keeping history and logging what's being executed > on the remote node. > + The connection is implemented with > + `the Fabric Python library `_. > > Attributes: > name: The name of the session. > @@ -82,6 +94,7 @@ class RemoteSession(ABC): > password: The password used in the connection. Most frequently > empty, > as the use of passwords is discouraged. > This isn't really about your patch but at some point we need to decide to remove password support for real, or (re)document it in the DTS documentation so that people can use it if they want. I'm not super keen on us keeping around easter egg code which will break later. :) Something we can chat about at the next DTS meeting. > history: The executed commands during this session. > + session: The underlying Fabric SSH session. > """ > > name: str > @@ -91,6 +104,7 @@ class RemoteSession(ABC): > username: str > password: str > history: list[CommandResult] > + session: Connection > _logger: DTSLogger > _node_config: NodeConfiguration > > 2.43.0 > > Happy to see the two classes reduced into just RemoteSession. Reviewed-by: Patrick Robb