[DOC] Add states and transitons diagram

Change-Id: Ifcc942612dd2371d9af1ec5174f61c2aeec4a008
This commit is contained in:
Zhenguo Niu 2017-06-06 17:34:43 +08:00
parent 1094e56a45
commit b1b58239db
3 changed files with 60 additions and 1 deletions

View File

@ -24,6 +24,7 @@ extensions = [
'openstackdocstheme',
'oslo_config.sphinxconfiggen',
'oslo_policy.sphinxpolicygen',
'sphinx.ext.graphviz',
]
# openstackdocstheme options

View File

@ -53,6 +53,13 @@ project.
Developer Contribution Guide <dev/code-contribution-guide>
Setting Up Your Development Environment <dev/dev-quickstart>
The following pages describe the architecture of the service.
.. toctree::
:maxdepth: 1
States and Transitions <states>
Advanced testing and guides
---------------------------
@ -61,7 +68,6 @@ Advanced testing and guides
dev/gmr
Administrator's Guide
=====================

52
doc/source/states.rst Normal file
View File

@ -0,0 +1,52 @@
States and Transitions
======================
The following diagram shows the states that a server goes through
during the lifetime.
Allowed State Transitions
--------------------------
.. graphviz::
digraph states {
graph [pad=".35", ranksep="0.65", nodesep="0.55", concentrate=true];
node [fontsize=10 fontname="Monospace"];
edge [arrowhead="normal", arrowsize="0.8"];
label="All states are allowed to transition to DELETING, MAINTENANCE and ERROR.";
forcelabels=true;
labelloc=bottom;
labeljust=left;
/* states */
building [label="BUILDING"]
active [label="ACTIVE"]
stopped [label="STOPPED"]
powering_on [label="POWERING_ON"]
powering_off [label="POWERING_OFF"]
soft_powering_off [label="SOFT_POWERING_OFF"]
rebooting [label="REBOOTING"]
soft_rebooting [label="SOFT_REBOOTING"]
rebuilding [label="REBUILDING"]
deleting [label="DELETING", color="red"]
error [label="ERROR", color="red"]
maintenance [label="MAINTENANCE", color="red"]
/* transitions [action] */
active -> rebuilding
active -> powering_off
active -> soft_powering_off
active -> rebooting
active -> soft_rebooting
stopped -> powering_on
stopped -> rebuilding
building -> active
rebuilding -> active
powering_on -> active
powering_off -> stopped
soft_powering_off -> stopped
rebooting -> active
soft_rebooting -> active
}