- Update doc/source/framework/index.rst with design principles and directory structure overview. - Add doc/source/framework/ssh/index.rst for SSH infrastructure, including connection behavior and flow. - Prepare structure for future SSH module-level documentation. Change-Id: Ia8df587d0ec5c1c3c756ed630d9e9ea122e8cfcf Signed-off-by: Andrew Vaillancourt <andrew.vaillancourt@windriver.com>
1.6 KiB
1.6 KiB
framework/ssh/ Documentation
The framework/ssh/ directory provides SSH-related infrastructure for the StarlingX Test Framework. It includes utilities for establishing remote connections, handling interactive prompts, and performing secure file transfers.
This layer is designed to be reusable across the entire framework, and abstracts SSH complexity away from keywords and test logic.
Contents
Overview
The SSH layer encapsulates all logic related to:
- Establishing connections (with or without jump hosts).
- Executing remote commands (including interactive or sudo-based workflows).
- Handling prompts using reusable response objects.
- Secure file transfers using built-in Paramiko support.
- Cleaning up output (e.g., removing ANSI sequences).
These modules are used by keyword implementations to run system-level commands on remote hosts in a consistent and fault-tolerant manner.
Connection Behavior
The SSH connection adapts based on the test lab's setup and the type of command being executed:
- Check whether a jump host is required.
- If needed, connect to the jump host using Paramiko.
- Open a channel to the final destination (target host).
- Establish the SSH session to the target host.
- Use one of the following modes:
exec_command()for simple non-interactive commands.invoke_shell()when prompt interaction orsudois needed.
- Execute the command and capture output.
- Strip any ANSI escape sequences for cleaner parsing/logs.