/*
 * This is a Graphviz diagram specification for the pool map state transitions
 *
 * You can compile it by installing graphviz and running:
 *   dot -Tpng -o pool_component_state_transition_diagram.png < pool_component_state_transition_diagram.gv
 */

digraph finite_state_machine {
	rankdir=LR;
	size="20,20"
	node [shape = doublecircle, width = 1.1]; UPIN;
	node [shape = none, width = 0, fixedsize = true]; _
	node [shape = circle, width = 1.1];

	NEW [ label = "NEW\nfseq == 0" ];
	NEW_UNHEALTHY [ label = "NEW\nfseq != 0" ];
	_ [ label = "" ];

	_ -> NEW [ label = "Extend" ];
	NEW -> NEW_UNHEALTHY [ label = "Failed" ];
	NEW_UNHEALTHY -> DOWN [ label = "Extend Complete" ];
	NEW -> UPIN [ label = "Extended" ];
	UPIN -> DOWN [ label = "Failed" ];
	UPIN -> DRAIN [ label = "Drain" ];
	DRAIN -> DOWN [ label = "Failed" ];
	DRAIN -> DOWNOUT [ label = "Drained" ];
	DOWN -> DOWNOUT [ label = "Rebuilt" ];
	UP -> UPIN [ label = "Reintegrated" ];
	DOWNOUT -> UP [ label = "Reintegrate" ];
	UP -> DOWNOUT [ label = "Failed" ];
}
