Function start_allocation

Source
pub fn start_allocation(
    state: OpState,
    plan: Vec<AllocationPlanEntry>,
    op_id: u64,
) -> TransitionRes
Expand description

Start an allocation from Idle state.

§Arguments

  • state - Current state (must be Idle)
  • plan - Allocation steps specifying where to allocate
  • op_id - Unique operation ID for correlation

§Returns

  • Ok(TransitionResult) with new Allocating state
  • Err(TransitionError::WrongState) if not in Idle state
  • Err(TransitionError::EmptyAllocationPlan) if plan is empty