Default Controller
REST API module for mission management.
Provides endpoints for mission submission and integrates with gRPC services for processing. Includes comprehensive logging configuration for both file and console outputs.
- default_controller.mission_post(body)[source]
Submit a mission and receive the mission ID.
This endpoint accepts a mission in JSON format, processes it, and sends it to the gRPC REST client. If successful, it returns the mission ID.
- Parameters:
body (dict | bytes) – The mission data in JSON format. Must match the Mission schema.
- Returns:
Response object containing mission ID or error message with status code
- Return type:
tuple(MissionIdResponse, int) or tuple(str, int)
- Raises:
ValidationError – If input data doesn’t match the expected schema
- default_controller.create_rest_logger()[source]
Create and configure a concurrent logger for REST operations.
Configures a logger with: - Rotating file handler (max 1MB per file, 5 backups) - Console stream handler - Unified formatting with timestamp, name, and log level
- Returns:
Configured logger instance ready for use
- Return type:
logging.Logger