romtools.hpc.connection#
Functions
|
Run a shell command on this machine. |
Classes
|
A simple SSH connection class that uses subprocess to execute SSH and SCP commands. |
|
Simple class to encapsulate the result of a command execution. |
- class romtools.hpc.connection.Connection(host, user=None, port=None, persist_seconds=600)[source]#
Bases:
objectA simple SSH connection class that uses subprocess to execute SSH and SCP commands.
This uses connection multiplexing (ControlMaster) to reuse an existing connection per SSH session (thus only requiring authentication & handshakes once).
- class romtools.hpc.connection.Result(stdout, stderr, exit_code)[source]#
Bases:
objectSimple class to encapsulate the result of a command execution.
- romtools.hpc.connection.run_local_bash(cmd)[source]#
Run a shell command on this machine.
Components that only need to issue shell commands take a run_cmd callable rather than a Connection, so the same logic serves either machine. This is the local half; Connection.run is the remote one.
- Parameters:
cmd (str)
- Return type: