Module session

Module session 

Source
Expand description

CFS session queries, creation, deletion, and console-readiness validation.

Session deletion follows the plan/apply pattern shared with crate::service::boot_parameters and crate::service::configuration: prepare_session_deletion collects everything the delete will need (the session itself, image ids it produced, CFS components, BSS boot parameters) without mutating state, and execute_session_deletion applies the plan. The two-step shape lets the CLI render a confirmation prompt with the full blast radius before any backend write.

validate_session_access and validate_console_session are standalone pre-checks used by handlers that need to fail-fast before doing anything else (typically a console attach).

Structs§

CreateCfsSessionParams
Parameters for create_cfs_session. Bundled to keep the service entry point readable at the call site (the handler-level CreateSessionRequest body folds 1:1 into this).
GetSessionParams
Typed parameters for fetching CFS sessions.
SessionDeletionContext
Data needed to delete/cancel a session.

Functions§

create_cfs_session
Create a CFS session, expanding the ansible-limit hosts expression to xnames first.
execute_session_deletion
Apply a session delete previously planned by prepare_session_deletion.
get_sessions
List CFS sessions visible to the caller, applying every filter on params.
prepare_session_deletion
Collect everything a session-delete operation will need, without mutating any state.
require_result_image
Reject sessions that didn’t produce a result image.
stream_logs
Tail the Ansible-container log for session_name via a buffered reader.
validate_console_session
Validate that a CFS session is suitable for attaching a console.
validate_session_access
Fetch a session by name and validate that the caller is allowed to act on it.