Skip to content

Feature: Add kasm_sessions and kasm_session_status data sources#10

Open
SiM22 wants to merge 16 commits intomainfrom
feature/session-data-sources
Open

Feature: Add kasm_sessions and kasm_session_status data sources#10
SiM22 wants to merge 16 commits intomainfrom
feature/session-data-sources

Conversation

@SiM22
Copy link
Copy Markdown
Owner

@SiM22 SiM22 commented Mar 3, 2025

Description

This PR implements two new data sources for retrieving and managing Kasm sessions:

Key Features

  1. kasm_sessions Data Source: Provides access to all active Kasm sessions in the system, including details like container IDs, operational status, and image information.

  2. kasm_session_status Data Source: Allows checking the status of a specific Kasm session by user ID and session ID, with options to skip agent checks.

  3. Documentation Updates: Added comprehensive documentation for both data sources in the docs directory and updated the API implementation status document.

Implementation Details

  • Added a status field to the session_status data source to match what the tests expect
  • Fixed the operational_status field to default to "unknown" when not provided by the API
  • Implemented proper error handling for API responses
  • Added acceptance tests for both data sources

Testing

All tests for the new data sources are passing.

Usage Examples

The PR includes usage examples in the documentation showing how to retrieve session information and check session status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant