Switch State Diagram
This document describes the Finite State Machine (FSM) for Switches in NICo: lifecycle from creation through configuration, validation, ready, optional reprovisioning, and deletion.
High-Level Overview
The main flow shows the primary states and transitions:
States
Transitions (by trigger)
Implementation
- State type:
SwitchControllerStateincrates/api-model/src/switch/mod.rs. - Handlers:
crates/api/src/state_controller/switch/— one module per top-level state (created,initializing,configuring,validating,bom_validating,ready,reprovisioning,error_state,deleting). - Orchestration:
SwitchStateHandlerinhandler.rsdelegates to the handler for the currentcontroller_state.