Bases: FiniteMachine
An ironic state-machine class with some ironic specific additions.
Adds a given state to the state machine.
stable – Use this to specify that this state is a stable/passive state. A state must have been previously defined as ‘stable’ before it can be used as a ‘target’
target – The target state for ‘state’ to go to. Before a state can be used as a target it must have been previously added and specified as ‘stable’
Further arguments are interpreted as for parent method add_state
.
Adds an allowed transition from start -> end for the given event.
start – starting state
end – ending state
event – event that causes start state to transition to end state
replace – replace existing event instead of raising a
Duplicate
exception
when the transition already exists.
Initialize the FSM.
start_state – the FSM is initialized to start from this state
target_state – if specified, the FSM is initialized to this target state. Otherwise use the default target state
Is the state stable?
state – the state of interest
InvalidState if the state is invalid
True if it is a stable state; False otherwise
process the event.
event – the event to be processed
target_state – if specified, the ‘final’ target state for the event. Otherwise, use the default target state
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.