Merge "Show transitions initiated by API requests"

This commit is contained in:
Jenkins 2016-02-09 10:45:14 +00:00 committed by Gerrit Code Review
commit c9f96d6d79
3 changed files with 194 additions and 144 deletions

View File

@ -11,6 +11,12 @@ The diagram below shows the provisioning states that an Ironic node goes
through during the lifetime of a node. The diagram also depicts the events
that transition the node to different states.
Stable states are highlighted with a thicker border. All transitions from
stable states are initiated by API requests. There are a few other
API-initiated-transitions that are possible from non-stable states.
The events for these API-initiated transitions are indicated with '(via API)'.
Internally, the conductor initiates the other transitions (depicted in gray).
.. figure:: ../images/states.svg
:width: 660px
:align: left
@ -21,4 +27,4 @@ that transition the node to different states.
For more information about the states, see the specification located at
`ironic-state-machine`_.
.. _ironic-state-machine: http://specs.openstack.org/openstack/ironic-specs/specs/kilo/new-ironic-state-machine.html
.. _ironic-state-machine: http://specs.openstack.org/openstack/ironic-specs/specs/kilo-implemented/new-ironic-state-machine.html

View File

@ -4,295 +4,295 @@
<!-- Generated by graphviz version 2.30.1 (20140821.0912)
-->
<!-- Title: Ironic states Pages: 1 -->
<svg width="1604pt" height="505pt"
viewBox="0.00 0.00 1604.00 505.06" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 501.06)">
<svg width="1724pt" height="486pt"
viewBox="0.00 0.00 1724.00 486.31" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 482.309)">
<title>Ironic states</title>
<polygon fill="white" stroke="white" points="-4,5 -4,-501.06 1601,-501.06 1601,5 -4,5"/>
<polygon fill="white" stroke="white" points="-4,5 -4,-482.309 1721,-482.309 1721,5 -4,5"/>
<!-- enroll -->
<g id="node1" class="node"><title>enroll</title>
<ellipse fill="none" stroke="black" cx="27" cy="-143.06" rx="27" ry="18"/>
<text text-anchor="middle" x="27" y="-140.26" font-family="Times,serif" font-size="11.00">enroll</text>
<ellipse fill="none" stroke="black" stroke-width="1.7" cx="27" cy="-136.309" rx="27" ry="18"/>
<text text-anchor="middle" x="27" y="-133.509" font-family="Times,serif" font-size="11.00">enroll</text>
</g>
<!-- verifying -->
<g id="node2" class="node"><title>verifying</title>
<ellipse fill="none" stroke="black" cx="188" cy="-143.06" rx="33.8507" ry="18"/>
<text text-anchor="middle" x="188" y="-140.26" font-family="Times,serif" font-size="11.00">verifying</text>
<ellipse fill="none" stroke="black" cx="210" cy="-136.309" rx="33.8507" ry="18"/>
<text text-anchor="middle" x="210" y="-133.509" font-family="Times,serif" font-size="11.00" fill="gray">verifying</text>
</g>
<!-- enroll&#45;&gt;verifying -->
<g id="edge1" class="edge"><title>enroll&#45;&gt;verifying</title>
<path fill="none" stroke="black" d="M54.2556,-143.06C78.6082,-143.06 115.297,-143.06 143.936,-143.06"/>
<polygon fill="black" stroke="black" points="144.085,-146.56 154.085,-143.06 144.085,-139.56 144.085,-146.56"/>
<text text-anchor="middle" x="104" y="-146.86" font-family="Times,serif" font-size="14.00">on_manage</text>
<path fill="none" stroke="black" d="M54.319,-136.309C83.5522,-136.309 131.193,-136.309 165.889,-136.309"/>
<polygon fill="black" stroke="black" points="166.207,-139.81 176.207,-136.309 166.207,-132.81 166.207,-139.81"/>
<text text-anchor="middle" x="115" y="-139.709" font-family="Times,serif" font-size="12.00">manage (via API)</text>
</g>
<!-- manageable -->
<g id="node3" class="node"><title>manageable</title>
<ellipse fill="none" stroke="black" cx="348" cy="-143.06" rx="42.1875" ry="18"/>
<text text-anchor="middle" x="348" y="-140.26" font-family="Times,serif" font-size="11.00">manageable</text>
<ellipse fill="none" stroke="black" stroke-width="1.7" cx="346" cy="-136.309" rx="42.1875" ry="18"/>
<text text-anchor="middle" x="346" y="-133.509" font-family="Times,serif" font-size="11.00">manageable</text>
</g>
<!-- verifying&#45;&gt;manageable -->
<g id="edge11" class="edge"><title>verifying&#45;&gt;manageable</title>
<path fill="none" stroke="black" d="M221.738,-143.06C243.092,-143.06 271.41,-143.06 295.718,-143.06"/>
<polygon fill="black" stroke="black" points="295.858,-146.56 305.858,-143.06 295.858,-139.56 295.858,-146.56"/>
<text text-anchor="middle" x="264" y="-146.86" font-family="Times,serif" font-size="14.00">on_done</text>
<path fill="none" stroke="black" d="M243.78,-136.309C258.666,-136.309 276.633,-136.309 293.273,-136.309"/>
<polygon fill="black" stroke="black" points="293.422,-139.81 303.422,-136.309 293.422,-132.81 293.422,-139.81"/>
<text text-anchor="middle" x="274" y="-139.709" font-family="Times,serif" font-size="12.00" fill="gray">done</text>
</g>
<!-- verifying&#45;&gt;enroll -->
<g id="edge12" class="edge"><title>verifying&#45;&gt;enroll</title>
<path fill="none" stroke="black" d="M161.82,-131.657C153.743,-128.553 144.648,-125.619 136,-124.06 108.007,-119.015 99.8557,-118.303 72,-124.06 67.4776,-124.995 62.8481,-126.417 58.3704,-128.072"/>
<polygon fill="black" stroke="black" points="56.8256,-124.923 48.9111,-131.967 59.4906,-131.396 56.8256,-124.923"/>
<text text-anchor="middle" x="104" y="-127.86" font-family="Times,serif" font-size="14.00" fill="red">on_fail</text>
<path fill="none" stroke="black" d="M182.674,-125.744C174.862,-123.1 166.199,-120.64 158,-119.309 120.271,-113.187 109.575,-112.303 72,-119.309 67.7433,-120.103 63.368,-121.294 59.1046,-122.685"/>
<polygon fill="black" stroke="black" points="57.6647,-119.484 49.4683,-126.198 60.0622,-126.061 57.6647,-119.484"/>
<text text-anchor="middle" x="115" y="-122.709" font-family="Times,serif" font-size="12.00" fill="gray">fail</text>
</g>
<!-- cleaning -->
<g id="node4" class="node"><title>cleaning</title>
<ellipse fill="none" stroke="black" cx="528" cy="-217.06" rx="32.4445" ry="18"/>
<text text-anchor="middle" x="528" y="-214.26" font-family="Times,serif" font-size="11.00">cleaning</text>
<ellipse fill="none" stroke="black" cx="551" cy="-210.309" rx="32.4445" ry="18"/>
<text text-anchor="middle" x="551" y="-207.509" font-family="Times,serif" font-size="11.00" fill="gray">cleaning</text>
</g>
<!-- manageable&#45;&gt;cleaning -->
<g id="edge2" class="edge"><title>manageable&#45;&gt;cleaning</title>
<path fill="none" stroke="black" d="M357.933,-160.807C367.647,-177.938 384.925,-202.876 408,-214.06 432.3,-225.838 462.795,-226.374 486.831,-224.077"/>
<polygon fill="black" stroke="black" points="487.504,-227.522 497.037,-222.897 486.701,-220.568 487.504,-227.522"/>
<text text-anchor="middle" x="440" y="-228.86" font-family="Times,serif" font-size="14.00">on_provide</text>
<path fill="none" stroke="black" d="M356.809,-153.884C366.852,-169.946 384.075,-192.754 406,-203.309 438.278,-218.849 479.474,-219.201 509.527,-216.49"/>
<polygon fill="black" stroke="black" points="510.082,-219.951 519.66,-215.423 509.349,-212.99 510.082,-219.951"/>
<text text-anchor="middle" x="448" y="-220.709" font-family="Times,serif" font-size="12.00">provide (via API)</text>
</g>
<!-- manageable&#45;&gt;cleaning -->
<g id="edge3" class="edge"><title>manageable&#45;&gt;cleaning</title>
<path fill="none" stroke="black" d="M372.507,-157.787C383.082,-163.995 395.889,-170.95 408,-176.06 435.338,-187.595 443.974,-185.318 472,-195.06 478.592,-197.352 485.554,-199.974 492.226,-202.591"/>
<polygon fill="black" stroke="black" points="491.133,-205.923 501.718,-206.382 493.729,-199.423 491.133,-205.923"/>
<text text-anchor="middle" x="440" y="-198.86" font-family="Times,serif" font-size="14.00">on_clean</text>
<path fill="none" stroke="black" d="M371.314,-150.921C381.713,-156.68 394.166,-162.948 406,-167.309 441.915,-180.546 453.45,-174.944 490,-186.309 498.393,-188.919 507.268,-192.179 515.545,-195.447"/>
<polygon fill="black" stroke="black" points="514.338,-198.735 524.92,-199.249 516.968,-192.248 514.338,-198.735"/>
<text text-anchor="middle" x="448" y="-189.709" font-family="Times,serif" font-size="12.00">clean (via API)</text>
</g>
<!-- inspecting -->
<g id="node5" class="node"><title>inspecting</title>
<ellipse fill="none" stroke="black" cx="528" cy="-26.0603" rx="37.0671" ry="18"/>
<text text-anchor="middle" x="528" y="-23.2603" font-family="Times,serif" font-size="11.00">inspecting</text>
<ellipse fill="none" stroke="black" cx="551" cy="-23.3094" rx="37.0671" ry="18"/>
<text text-anchor="middle" x="551" y="-20.5094" font-family="Times,serif" font-size="11.00" fill="gray">inspecting</text>
</g>
<!-- manageable&#45;&gt;inspecting -->
<g id="edge4" class="edge"><title>manageable&#45;&gt;inspecting</title>
<path fill="none" stroke="black" d="M355.512,-125.089C364.142,-103.936 381.447,-69.3752 408,-51.0603 429.117,-36.4947 457,-30.1241 480.467,-27.4504"/>
<polygon fill="black" stroke="black" points="480.934,-30.9218 490.558,-26.4917 480.272,-23.9532 480.934,-30.9218"/>
<text text-anchor="middle" x="440" y="-54.8603" font-family="Times,serif" font-size="14.00">on_inspect</text>
<path fill="none" stroke="black" d="M354.248,-118.338C363.276,-98.3835 380.665,-66.8151 406,-50.3094 421.906,-39.947 468.219,-32.4895 504.072,-28.0722"/>
<polygon fill="black" stroke="black" points="504.827,-31.5072 514.345,-26.853 504.002,-24.556 504.827,-31.5072"/>
<text text-anchor="middle" x="448" y="-53.7094" font-family="Times,serif" font-size="12.00">inspect (via API)</text>
</g>
<!-- available -->
<g id="node6" class="node"><title>available</title>
<ellipse fill="none" stroke="black" cx="713" cy="-329.06" rx="34.054" ry="18"/>
<text text-anchor="middle" x="713" y="-326.26" font-family="Times,serif" font-size="11.00">available</text>
<ellipse fill="none" stroke="black" stroke-width="1.7" cx="763" cy="-319.309" rx="34.054" ry="18"/>
<text text-anchor="middle" x="763" y="-316.509" font-family="Times,serif" font-size="11.00">available</text>
</g>
<!-- cleaning&#45;&gt;available -->
<g id="edge22" class="edge"><title>cleaning&#45;&gt;available</title>
<path fill="none" stroke="black" d="M540.809,-233.902C550.925,-247.234 566.586,-265.478 584,-277.06 609.167,-293.799 619.99,-288.703 648,-300.06 657.75,-304.014 668.195,-308.595 677.76,-312.933"/>
<polygon fill="black" stroke="black" points="676.424,-316.17 686.973,-317.156 679.341,-309.807 676.424,-316.17"/>
<text text-anchor="middle" x="616" y="-303.86" font-family="Times,serif" font-size="14.00">on_done</text>
<path fill="none" stroke="black" d="M564.556,-226.687C575.644,-240.05 592.974,-258.437 612,-269.309 646.352,-288.94 660.573,-279.478 698,-292.309 707.652,-295.618 717.915,-299.689 727.33,-303.657"/>
<polygon fill="black" stroke="black" points="726.205,-306.983 736.775,-307.719 728.971,-300.553 726.205,-306.983"/>
<text text-anchor="middle" x="655" y="-295.709" font-family="Times,serif" font-size="12.00" fill="gray">done</text>
</g>
<!-- clean failed -->
<g id="node13" class="node"><title>clean failed</title>
<ellipse fill="none" stroke="black" cx="896" cy="-223.06" rx="41.4846" ry="18"/>
<text text-anchor="middle" x="896" y="-220.26" font-family="Times,serif" font-size="11.00" fill="red">clean failed</text>
<ellipse fill="none" stroke="black" cx="964" cy="-216.309" rx="41.4846" ry="18"/>
<text text-anchor="middle" x="964" y="-213.509" font-family="Times,serif" font-size="11.00" fill="red">clean failed</text>
</g>
<!-- cleaning&#45;&gt;clean failed -->
<g id="edge23" class="edge"><title>cleaning&#45;&gt;clean failed</title>
<path fill="none" stroke="black" d="M555.536,-226.665C564.467,-229.519 574.561,-232.339 584,-234.06 694.198,-254.151 724.947,-252.699 836,-238.06 841.044,-237.395 846.278,-236.45 851.451,-235.353"/>
<polygon fill="black" stroke="black" points="852.302,-238.749 861.259,-233.092 850.729,-231.928 852.302,-238.749"/>
<text text-anchor="middle" x="713" y="-252.86" font-family="Times,serif" font-size="14.00" fill="red">on_fail</text>
<path fill="none" stroke="black" d="M579.519,-218.962C589.632,-221.792 601.241,-224.636 612,-226.309 740.242,-246.259 775.134,-244.727 904,-229.309 908.516,-228.769 913.194,-228.039 917.851,-227.199"/>
<polygon fill="black" stroke="black" points="918.802,-230.579 927.939,-225.214 917.451,-223.71 918.802,-230.579"/>
<text text-anchor="middle" x="763" y="-243.709" font-family="Times,serif" font-size="12.00" fill="gray">fail</text>
</g>
<!-- clean wait -->
<g id="node14" class="node"><title>clean wait</title>
<ellipse fill="none" stroke="black" cx="713" cy="-212.06" rx="37.7689" ry="18"/>
<text text-anchor="middle" x="713" y="-209.26" font-family="Times,serif" font-size="11.00">clean wait</text>
<ellipse fill="none" stroke="black" cx="763" cy="-204.309" rx="37.7689" ry="18"/>
<text text-anchor="middle" x="763" y="-201.509" font-family="Times,serif" font-size="11.00" fill="gray">clean wait</text>
</g>
<!-- cleaning&#45;&gt;clean wait -->
<g id="edge24" class="edge"><title>cleaning&#45;&gt;clean wait</title>
<path fill="none" stroke="black" d="M560.571,-216.316C584.554,-215.738 618.356,-214.897 648,-214.06 653.487,-213.905 659.238,-213.736 664.947,-213.563"/>
<polygon fill="black" stroke="black" points="665.224,-217.056 675.112,-213.251 665.009,-210.06 665.224,-217.056"/>
<text text-anchor="middle" x="616" y="-218.86" font-family="Times,serif" font-size="14.00">on_wait</text>
<path fill="none" stroke="black" d="M583.619,-209.899C613.196,-209.459 658.599,-208.637 698,-207.309 703.489,-207.124 709.241,-206.899 714.951,-206.656"/>
<polygon fill="black" stroke="black" points="715.283,-210.145 725.118,-206.204 714.972,-203.152 715.283,-210.145"/>
<text text-anchor="middle" x="655" y="-212.709" font-family="Times,serif" font-size="12.00" fill="gray">wait</text>
</g>
<!-- cleaning&#45;&gt;manageable -->
<g id="edge25" class="edge"><title>cleaning&#45;&gt;manageable</title>
<path fill="none" stroke="black" d="M516.428,-199.947C506.732,-185.879 491.013,-166.745 472,-157.06 450.078,-145.895 423.168,-141.915 400.114,-140.928"/>
<polygon fill="black" stroke="black" points="399.91,-137.422 389.825,-140.67 399.734,-144.419 399.91,-137.422"/>
<text text-anchor="middle" x="440" y="-160.86" font-family="Times,serif" font-size="14.00">on_manage</text>
<path fill="none" stroke="black" d="M538.574,-193.664C527.829,-179.491 510.378,-159.94 490,-150.309 461.377,-136.782 425.988,-133.226 397.577,-133.08"/>
<polygon fill="black" stroke="black" points="397.42,-129.581 387.451,-133.168 397.481,-136.581 397.42,-129.581"/>
<text text-anchor="middle" x="448" y="-153.709" font-family="Times,serif" font-size="12.00" fill="gray">manage</text>
</g>
<!-- inspecting&#45;&gt;manageable -->
<g id="edge32" class="edge"><title>inspecting&#45;&gt;manageable</title>
<path fill="none" stroke="black" d="M501.143,-13.3263C475.454,-2.6721 435.96,8.12396 408,-10.0603 372.423,-33.1984 358.132,-83.25 352.51,-114.924"/>
<polygon fill="black" stroke="black" points="349.039,-114.469 350.918,-124.895 355.951,-115.572 349.039,-114.469"/>
<text text-anchor="middle" x="440" y="-13.8603" font-family="Times,serif" font-size="14.00">on_done</text>
<path fill="none" stroke="black" d="M521.615,-12.0674C490.699,-1.80437 440.995,8.71678 406,-13.3094 373.153,-33.9839 358.182,-78.5917 351.661,-108.02"/>
<polygon fill="black" stroke="black" points="348.174,-107.607 349.624,-118.102 355.035,-108.994 348.174,-107.607"/>
<text text-anchor="middle" x="448" y="-16.7094" font-family="Times,serif" font-size="12.00" fill="gray">done</text>
</g>
<!-- inspect failed -->
<g id="node15" class="node"><title>inspect failed</title>
<ellipse fill="none" stroke="black" cx="713" cy="-56.0603" rx="46.1069" ry="18"/>
<text text-anchor="middle" x="713" y="-53.2603" font-family="Times,serif" font-size="11.00" fill="red">inspect failed</text>
<ellipse fill="none" stroke="black" cx="763" cy="-51.3094" rx="46.1069" ry="18"/>
<text text-anchor="middle" x="763" y="-48.5094" font-family="Times,serif" font-size="11.00" fill="red">inspect failed</text>
</g>
<!-- inspecting&#45;&gt;inspect failed -->
<g id="edge33" class="edge"><title>inspecting&#45;&gt;inspect failed</title>
<path fill="none" stroke="black" d="M557.167,-37.285C565.668,-40.2635 575.106,-43.1723 584,-45.0603 607.461,-50.0406 633.797,-52.7778 656.453,-54.2776"/>
<polygon fill="black" stroke="black" points="656.389,-57.7799 666.58,-54.8833 656.806,-50.7924 656.389,-57.7799"/>
<text text-anchor="middle" x="616" y="-57.8603" font-family="Times,serif" font-size="14.00" fill="red">on_fail</text>
<path fill="none" stroke="black" d="M582.246,-33.1699C591.683,-35.8963 602.191,-38.5786 612,-40.3094 643.032,-45.7849 678.14,-48.5425 706.585,-49.9279"/>
<polygon fill="black" stroke="black" points="706.598,-53.4318 716.744,-50.3787 706.909,-46.4387 706.598,-53.4318"/>
<text text-anchor="middle" x="655" y="-53.7094" font-family="Times,serif" font-size="12.00" fill="gray">fail</text>
</g>
<!-- deploying -->
<g id="node7" class="node"><title>deploying</title>
<ellipse fill="none" stroke="black" cx="896" cy="-338.06" rx="35.4579" ry="18"/>
<text text-anchor="middle" x="896" y="-335.26" font-family="Times,serif" font-size="11.00">deploying</text>
<ellipse fill="none" stroke="black" cx="964" cy="-329.309" rx="35.4579" ry="18"/>
<text text-anchor="middle" x="964" y="-326.509" font-family="Times,serif" font-size="11.00" fill="gray">deploying</text>
</g>
<!-- available&#45;&gt;deploying -->
<g id="edge5" class="edge"><title>available&#45;&gt;deploying</title>
<path fill="none" stroke="black" d="M747.198,-330.711C776.081,-332.147 818.192,-334.241 850.083,-335.827"/>
<polygon fill="black" stroke="black" points="850.311,-339.342 860.473,-336.343 850.659,-332.351 850.311,-339.342"/>
<text text-anchor="middle" x="807" y="-337.86" font-family="Times,serif" font-size="14.00">on_deploy</text>
<path fill="none" stroke="black" d="M797.308,-320.983C830.44,-322.648 881.492,-325.214 918.17,-327.057"/>
<polygon fill="black" stroke="black" points="918.418,-330.573 928.581,-327.58 918.769,-323.582 918.418,-330.573"/>
<text text-anchor="middle" x="866" y="-328.709" font-family="Times,serif" font-size="12.00">active (via API)</text>
</g>
<!-- available&#45;&gt;manageable -->
<g id="edge6" class="edge"><title>available&#45;&gt;manageable</title>
<path fill="none" stroke="black" d="M678.473,-328.642C617.437,-326.135 487.19,-312.509 408,-244.06 384.981,-224.164 368.697,-192.96 359.149,-170.501"/>
<polygon fill="black" stroke="black" points="362.363,-169.113 355.353,-161.169 355.879,-171.751 362.363,-169.113"/>
<text text-anchor="middle" x="528" y="-317.86" font-family="Times,serif" font-size="14.00">on_manage</text>
<path fill="none" stroke="black" d="M728.715,-320.4C660.462,-320.882 502.935,-312.76 406,-234.309 382.975,-215.675 366.751,-185.486 357.221,-163.534"/>
<polygon fill="black" stroke="black" points="360.373,-161.997 353.312,-154.098 353.905,-164.676 360.373,-161.997"/>
<text text-anchor="middle" x="551" y="-312.709" font-family="Times,serif" font-size="12.00">manage (via API)</text>
</g>
<!-- deploy failed -->
<g id="node11" class="node"><title>deploy failed</title>
<ellipse fill="none" stroke="black" cx="1253" cy="-295.06" rx="44.498" ry="18"/>
<text text-anchor="middle" x="1253" y="-292.26" font-family="Times,serif" font-size="11.00" fill="red">deploy failed</text>
<ellipse fill="none" stroke="black" cx="1317" cy="-286.309" rx="44.498" ry="18"/>
<text text-anchor="middle" x="1317" y="-283.509" font-family="Times,serif" font-size="11.00" fill="red">deploy failed</text>
</g>
<!-- deploying&#45;&gt;deploy failed -->
<g id="edge13" class="edge"><title>deploying&#45;&gt;deploy failed</title>
<path fill="none" stroke="black" d="M928.71,-330.782C937.507,-328.99 947.089,-327.246 956,-326.06 1059.3,-312.31 1087.09,-327.487 1190,-311.06 1195.42,-310.195 1201.06,-309.069 1206.62,-307.813"/>
<polygon fill="black" stroke="black" points="1207.6,-311.179 1216.51,-305.444 1205.97,-304.372 1207.6,-311.179"/>
<text text-anchor="middle" x="1084" y="-322.86" font-family="Times,serif" font-size="14.00" fill="red">on_fail</text>
<path fill="none" stroke="black" d="M996.718,-322.089C1005.51,-320.297 1015.1,-318.539 1024,-317.309 1125.54,-303.289 1152.62,-315.417 1254,-300.309 1258.8,-299.595 1263.77,-298.713 1268.72,-297.743"/>
<polygon fill="black" stroke="black" points="1269.71,-301.112 1278.79,-295.651 1268.29,-294.258 1269.71,-301.112"/>
<text text-anchor="middle" x="1172" y="-312.709" font-family="Times,serif" font-size="12.00" fill="gray">fail</text>
</g>
<!-- wait call&#45;back -->
<g id="node12" class="node"><title>wait call&#45;back</title>
<ellipse fill="none" stroke="black" cx="1084" cy="-364.06" rx="48.2143" ry="18"/>
<text text-anchor="middle" x="1084" y="-361.26" font-family="Times,serif" font-size="11.00">wait call&#45;back</text>
<ellipse fill="none" stroke="black" cx="1172" cy="-351.309" rx="48.2143" ry="18"/>
<text text-anchor="middle" x="1172" y="-348.509" font-family="Times,serif" font-size="11.00" fill="gray">wait call&#45;back</text>
</g>
<!-- deploying&#45;&gt;wait call&#45;back -->
<g id="edge14" class="edge"><title>deploying&#45;&gt;wait call&#45;back</title>
<path fill="none" stroke="black" d="M926.773,-347.292C936.054,-349.856 946.38,-352.392 956,-354.06 978.669,-357.991 1003.88,-360.379 1025.84,-361.828"/>
<polygon fill="black" stroke="black" points="1025.8,-365.332 1036,-362.448 1026.23,-358.345 1025.8,-365.332"/>
<text text-anchor="middle" x="987" y="-363.86" font-family="Times,serif" font-size="14.00">on_wait</text>
<path fill="none" stroke="black" d="M995.727,-337.697C1004.77,-339.867 1014.73,-341.968 1024,-343.309 1053.38,-347.56 1086.37,-349.601 1113.63,-350.561"/>
<polygon fill="black" stroke="black" points="1113.68,-354.064 1123.78,-350.879 1113.9,-347.068 1113.68,-354.064"/>
<text text-anchor="middle" x="1065" y="-352.709" font-family="Times,serif" font-size="12.00" fill="gray">wait</text>
</g>
<!-- active -->
<g id="node8" class="node"><title>active</title>
<ellipse fill="none" stroke="black" cx="1084" cy="-418.06" rx="27" ry="18"/>
<text text-anchor="middle" x="1084" y="-415.26" font-family="Times,serif" font-size="11.00">active</text>
<ellipse fill="none" stroke="black" stroke-width="1.7" cx="1172" cy="-405.309" rx="27" ry="18"/>
<text text-anchor="middle" x="1172" y="-402.509" font-family="Times,serif" font-size="11.00">active</text>
</g>
<!-- deploying&#45;&gt;active -->
<g id="edge15" class="edge"><title>deploying&#45;&gt;active</title>
<path fill="none" stroke="black" d="M915.47,-353.125C926.661,-361.668 941.53,-372.023 956,-379.06 985.665,-393.486 1021.82,-403.966 1047.96,-410.406"/>
<polygon fill="black" stroke="black" points="1047.26,-413.837 1057.8,-412.757 1048.88,-407.029 1047.26,-413.837"/>
<text text-anchor="middle" x="987" y="-404.86" font-family="Times,serif" font-size="14.00">on_done</text>
<path fill="none" stroke="black" d="M984.914,-343.913C995.976,-351.47 1010.25,-360.337 1024,-366.309 1060.5,-382.163 1104.98,-392.868 1135.39,-398.991"/>
<polygon fill="black" stroke="black" points="1135.04,-402.488 1145.52,-400.967 1136.38,-395.618 1135.04,-402.488"/>
<text text-anchor="middle" x="1065" y="-394.709" font-family="Times,serif" font-size="12.00" fill="gray">done</text>
</g>
<!-- active&#45;&gt;deploying -->
<g id="edge7" class="edge"><title>active&#45;&gt;deploying</title>
<path fill="none" stroke="black" d="M1060.82,-427.327C1034.2,-436.902 989.036,-448.12 956,-430.06 931.022,-416.406 915.058,-387.16 906.12,-365.285"/>
<polygon fill="black" stroke="black" points="909.346,-363.923 902.501,-355.836 902.809,-366.427 909.346,-363.923"/>
<text text-anchor="middle" x="987" y="-442.86" font-family="Times,serif" font-size="14.00">on_rebuild</text>
<path fill="none" stroke="black" d="M1148.06,-413.944C1117.76,-423.837 1063.61,-436.169 1024,-415.309 1000.6,-402.983 984.689,-376.717 975.345,-356.437"/>
<polygon fill="black" stroke="black" points="978.466,-354.835 971.281,-347.049 972.042,-357.616 978.466,-354.835"/>
<text text-anchor="middle" x="1065" y="-429.709" font-family="Times,serif" font-size="12.00">rebuild (via API)</text>
</g>
<!-- deleting -->
<g id="node9" class="node"><title>deleting</title>
<ellipse fill="none" stroke="black" cx="1420" cy="-364.06" rx="31.0408" ry="18"/>
<text text-anchor="middle" x="1420" y="-361.26" font-family="Times,serif" font-size="11.00">deleting</text>
<ellipse fill="none" stroke="black" cx="1512" cy="-351.309" rx="31.0408" ry="18"/>
<text text-anchor="middle" x="1512" y="-348.509" font-family="Times,serif" font-size="11.00" fill="gray">deleting</text>
</g>
<!-- active&#45;&gt;deleting -->
<g id="edge8" class="edge"><title>active&#45;&gt;deleting</title>
<path fill="none" stroke="black" d="M1111.15,-415.618C1161.58,-410.637 1275.67,-398.056 1370,-378.06 1374.09,-377.193 1378.34,-376.17 1382.55,-375.076"/>
<polygon fill="black" stroke="black" points="1383.48,-378.449 1392.21,-372.441 1381.64,-371.696 1383.48,-378.449"/>
<text text-anchor="middle" x="1253" y="-407.86" font-family="Times,serif" font-size="14.00">on_delete</text>
<path fill="none" stroke="black" d="M1199.12,-402.939C1250.06,-398.041 1366.1,-385.541 1462,-365.309 1466.09,-364.446 1470.34,-363.425 1474.55,-362.333"/>
<polygon fill="black" stroke="black" points="1475.49,-365.706 1484.21,-359.699 1473.64,-358.953 1475.49,-365.706"/>
<text text-anchor="middle" x="1317" y="-397.709" font-family="Times,serif" font-size="12.00">deleted (via API)</text>
</g>
<!-- error -->
<g id="node10" class="node"><title>error</title>
<ellipse fill="none" stroke="black" cx="1569" cy="-402.06" rx="27" ry="18"/>
<text text-anchor="middle" x="1569" y="-399.26" font-family="Times,serif" font-size="11.00" fill="red">error</text>
<ellipse fill="none" stroke="black" stroke-width="1.7" cx="1689" cy="-387.309" rx="27" ry="18"/>
<text text-anchor="middle" x="1689" y="-384.509" font-family="Times,serif" font-size="11.00" fill="red">error</text>
</g>
<!-- deleting&#45;&gt;error -->
<g id="edge30" class="edge"><title>deleting&#45;&gt;error</title>
<path fill="none" stroke="black" d="M1449.13,-357.421C1470.44,-353.752 1500.03,-351.623 1524,-361.06 1533.42,-364.768 1542.01,-371.547 1549.06,-378.539"/>
<polygon fill="black" stroke="black" points="1546.69,-381.13 1556.06,-386.075 1551.82,-376.366 1546.69,-381.13"/>
<text text-anchor="middle" x="1497" y="-364.86" font-family="Times,serif" font-size="14.00" fill="red">on_error</text>
<path fill="none" stroke="black" d="M1541.12,-344.722C1568.37,-339.691 1610.39,-335.56 1644,-348.309 1652.92,-351.693 1661.19,-357.802 1668.09,-364.196"/>
<polygon fill="black" stroke="black" points="1666,-367.058 1675.53,-371.687 1670.97,-362.125 1666,-367.058"/>
<text text-anchor="middle" x="1603" y="-351.709" font-family="Times,serif" font-size="12.00" fill="gray">error</text>
</g>
<!-- deleting&#45;&gt;cleaning -->
<g id="edge31" class="edge"><title>deleting&#45;&gt;cleaning</title>
<path fill="none" stroke="black" d="M1413.84,-346.4C1398.42,-297.698 1347.8,-165.06 1254,-165.06 712,-165.06 712,-165.06 712,-165.06 654.277,-165.06 638.518,-168.095 584,-187.06 575.509,-190.014 566.767,-194.188 558.822,-198.486"/>
<polygon fill="black" stroke="black" points="556.902,-195.551 549.924,-203.523 560.35,-201.643 556.902,-195.551"/>
<text text-anchor="middle" x="987" y="-168.86" font-family="Times,serif" font-size="14.00">on_clean</text>
<path fill="none" stroke="black" d="M1503.74,-333.842C1482.69,-286.333 1416.8,-158.309 1318,-158.309 762,-158.309 762,-158.309 762,-158.309 694.485,-158.309 676.546,-162.51 612,-182.309 602.638,-185.181 592.863,-189.242 583.986,-193.383"/>
<polygon fill="black" stroke="black" points="582.238,-190.341 574.769,-197.855 585.293,-196.639 582.238,-190.341"/>
<text text-anchor="middle" x="1065" y="-161.709" font-family="Times,serif" font-size="12.00" fill="gray">clean</text>
</g>
<!-- error&#45;&gt;deploying -->
<g id="edge9" class="edge"><title>error&#45;&gt;deploying</title>
<path fill="none" stroke="black" d="M1553.16,-416.734C1528.16,-439.829 1475.04,-482.06 1421,-482.06 1083,-482.06 1083,-482.06 1083,-482.06 1025.56,-482.06 1001.72,-492.838 956,-458.06 926.181,-435.378 910.511,-393.605 903.001,-365.825"/>
<polygon fill="black" stroke="black" points="906.346,-364.774 900.51,-355.932 899.558,-366.484 906.346,-364.774"/>
<text text-anchor="middle" x="1253" y="-485.86" font-family="Times,serif" font-size="14.00">on_rebuild</text>
<path fill="none" stroke="black" d="M1670.75,-400.896C1640.6,-423.243 1575.53,-465.309 1513,-465.309 1171,-465.309 1171,-465.309 1171,-465.309 1104.94,-465.309 1077.73,-481.741 1024,-443.309 995.197,-422.708 979.419,-383.758 971.593,-357.176"/>
<polygon fill="black" stroke="black" points="974.909,-356.032 968.886,-347.316 968.159,-357.886 974.909,-356.032"/>
<text text-anchor="middle" x="1317" y="-468.709" font-family="Times,serif" font-size="12.00">rebuild (via API)</text>
</g>
<!-- error&#45;&gt;deleting -->
<g id="edge10" class="edge"><title>error&#45;&gt;deleting</title>
<path fill="none" stroke="black" d="M1542.86,-397.102C1522.97,-393.014 1494.55,-386.807 1470,-380.06 1465.83,-378.913 1461.48,-377.628 1457.17,-376.298"/>
<polygon fill="black" stroke="black" points="1457.9,-372.856 1447.31,-373.158 1455.78,-379.526 1457.9,-372.856"/>
<text text-anchor="middle" x="1497" y="-395.86" font-family="Times,serif" font-size="14.00">on_delete</text>
<path fill="none" stroke="black" d="M1662.26,-383.629C1636.68,-379.781 1596.41,-373.207 1562,-365.309 1557.93,-364.374 1553.69,-363.308 1549.48,-362.189"/>
<polygon fill="black" stroke="black" points="1550.4,-358.811 1539.83,-359.525 1548.53,-365.559 1550.4,-358.811"/>
<text text-anchor="middle" x="1603" y="-383.709" font-family="Times,serif" font-size="12.00">deleted (via API)</text>
</g>
<!-- deploy failed&#45;&gt;deploying -->
<g id="edge19" class="edge"><title>deploy failed&#45;&gt;deploying</title>
<path fill="none" stroke="black" d="M1208.39,-293.026C1164.63,-291.604 1095.41,-291.042 1036,-298.06 999.807,-302.336 990.932,-305.67 956,-316.06 948.796,-318.203 941.206,-320.782 933.958,-323.407"/>
<polygon fill="black" stroke="black" points="932.504,-320.213 924.352,-326.981 934.945,-326.774 932.504,-320.213"/>
<text text-anchor="middle" x="1084" y="-301.86" font-family="Times,serif" font-size="14.00">on_rebuild</text>
<path fill="none" stroke="black" d="M1272.94,-283.399C1215.09,-280.765 1109.63,-280.481 1024,-305.309 1016.23,-307.561 1008.09,-310.485 1000.42,-313.513"/>
<polygon fill="black" stroke="black" points="998.946,-310.334 991.018,-317.361 1001.6,-316.812 998.946,-310.334"/>
<text text-anchor="middle" x="1172" y="-289.709" font-family="Times,serif" font-size="12.00">rebuild (via API)</text>
</g>
<!-- deploy failed&#45;&gt;deploying -->
<g id="edge20" class="edge"><title>deploy failed&#45;&gt;deploying</title>
<path fill="none" stroke="black" d="M1214.43,-285.748C1171.26,-276.316 1098.33,-264.278 1036,-273.06 999.366,-278.222 989.324,-279.992 956,-296.06 944.613,-301.551 933.069,-309.208 923.248,-316.482"/>
<polygon fill="black" stroke="black" points="920.922,-313.855 915.109,-322.712 925.177,-319.413 920.922,-313.855"/>
<text text-anchor="middle" x="1084" y="-276.86" font-family="Times,serif" font-size="14.00">on_deploy</text>
<path fill="none" stroke="black" d="M1280.32,-276.116C1262.38,-271.511 1240.22,-266.596 1220,-264.309 1132.95,-254.462 1103.86,-249.275 1024,-285.309 1011.81,-290.811 999.72,-299.171 989.691,-307.132"/>
<polygon fill="black" stroke="black" points="987.276,-304.587 981.794,-313.653 991.733,-309.985 987.276,-304.587"/>
<text text-anchor="middle" x="1172" y="-267.709" font-family="Times,serif" font-size="12.00">active (via API)</text>
</g>
<!-- deploy failed&#45;&gt;deleting -->
<g id="edge21" class="edge"><title>deploy failed&#45;&gt;deleting</title>
<path fill="none" stroke="black" d="M1289.75,-305.33C1313.07,-312.524 1343.9,-322.987 1370,-335.06 1376.51,-338.072 1383.27,-341.706 1389.61,-345.368"/>
<polygon fill="black" stroke="black" points="1388.14,-348.567 1398.52,-350.683 1391.72,-342.555 1388.14,-348.567"/>
<text text-anchor="middle" x="1343" y="-338.86" font-family="Times,serif" font-size="14.00">on_delete</text>
<path fill="none" stroke="black" d="M1357.34,-293.952C1386.77,-300.32 1427.67,-310.567 1462,-324.309 1468.42,-326.88 1475.06,-330.111 1481.3,-333.434"/>
<polygon fill="black" stroke="black" points="1479.65,-336.517 1490.09,-338.305 1483.04,-330.395 1479.65,-336.517"/>
<text text-anchor="middle" x="1421" y="-327.709" font-family="Times,serif" font-size="12.00">deleted (via API)</text>
</g>
<!-- wait call&#45;back&#45;&gt;deploying -->
<g id="edge16" class="edge"><title>wait call&#45;back&#45;&gt;deploying</title>
<path fill="none" stroke="black" d="M1056.35,-349.131C1044.91,-343.54 1031.17,-337.866 1018,-335.06 992.691,-329.671 963.734,-330.16 940.494,-332.12"/>
<polygon fill="black" stroke="black" points="939.869,-328.664 930.252,-333.108 940.542,-335.631 939.869,-328.664"/>
<text text-anchor="middle" x="987" y="-338.86" font-family="Times,serif" font-size="14.00">on_resume</text>
<path fill="none" stroke="black" d="M1141.57,-337.365C1130.66,-332.9 1118.01,-328.539 1106,-326.309 1073.77,-320.325 1036.68,-321.421 1008.63,-323.828"/>
<polygon fill="black" stroke="black" points="1007.98,-320.374 998.357,-324.803 1008.64,-327.343 1007.98,-320.374"/>
<text text-anchor="middle" x="1065" y="-329.709" font-family="Times,serif" font-size="12.00" fill="gray">resume</text>
</g>
<!-- wait call&#45;back&#45;&gt;deploy failed -->
<g id="edge17" class="edge"><title>wait call&#45;back&#45;&gt;deploy failed</title>
<path fill="none" stroke="black" d="M1115.3,-350.197C1126.19,-345.304 1138.6,-339.835 1150,-335.06 1169.72,-326.799 1191.79,-318.081 1210.34,-310.9"/>
<polygon fill="black" stroke="black" points="1211.62,-314.158 1219.69,-307.295 1209.1,-307.627 1211.62,-314.158"/>
<text text-anchor="middle" x="1170" y="-338.86" font-family="Times,serif" font-size="14.00" fill="red">on_fail</text>
<path fill="none" stroke="black" d="M1203.33,-337.525C1224.94,-327.699 1254.18,-314.41 1277.45,-303.832"/>
<polygon fill="black" stroke="black" points="1279.04,-306.954 1286.7,-299.63 1276.14,-300.582 1279.04,-306.954"/>
<text text-anchor="middle" x="1246" y="-323.709" font-family="Times,serif" font-size="12.00" fill="gray">fail</text>
</g>
<!-- wait call&#45;back&#45;&gt;deleting -->
<g id="edge18" class="edge"><title>wait call&#45;back&#45;&gt;deleting</title>
<path fill="none" stroke="black" d="M1132.15,-364.06C1197.93,-364.06 1316.16,-364.06 1378.3,-364.06"/>
<polygon fill="black" stroke="black" points="1378.5,-367.56 1388.5,-364.06 1378.5,-360.56 1378.5,-367.56"/>
<text text-anchor="middle" x="1253" y="-367.86" font-family="Times,serif" font-size="14.00">on_delete</text>
<path fill="none" stroke="black" d="M1220.35,-351.309C1286.99,-351.309 1407.31,-351.309 1470.2,-351.309"/>
<polygon fill="black" stroke="black" points="1470.52,-354.81 1480.52,-351.309 1470.52,-347.81 1470.52,-354.81"/>
<text text-anchor="middle" x="1317" y="-354.709" font-family="Times,serif" font-size="12.00">deleted (via API)</text>
</g>
<!-- clean failed&#45;&gt;manageable -->
<g id="edge29" class="edge"><title>clean failed&#45;&gt;manageable</title>
<path fill="none" stroke="black" d="M871.515,-208.282C860.943,-202.065 848.133,-195.117 836,-190.06 755.755,-156.62 734.085,-148.179 648,-136.06 561.177,-123.838 458.801,-130.785 399.166,-136.931"/>
<polygon fill="black" stroke="black" points="398.472,-133.485 388.899,-138.025 399.214,-140.446 398.472,-133.485"/>
<text text-anchor="middle" x="616" y="-139.86" font-family="Times,serif" font-size="14.00">on_manage</text>
<path fill="none" stroke="black" d="M940.499,-201.349C929.799,-194.764 916.612,-187.387 904,-182.309 816.505,-147.084 791.626,-142.727 698,-131.309 591.548,-118.328 465.6,-125.555 397.254,-131.343"/>
<polygon fill="black" stroke="black" points="396.853,-127.864 387.195,-132.22 397.461,-134.838 396.853,-127.864"/>
<text text-anchor="middle" x="655" y="-134.709" font-family="Times,serif" font-size="12.00">manage (via API)</text>
</g>
<!-- clean wait&#45;&gt;clean failed -->
<g id="edge26" class="edge"><title>clean wait&#45;&gt;clean failed</title>
<path fill="none" stroke="black" d="M750.628,-214.286C777.61,-215.926 814.637,-218.176 844.437,-219.987"/>
<polygon fill="black" stroke="black" points="844.454,-223.495 854.648,-220.608 844.878,-216.508 844.454,-223.495"/>
<text text-anchor="middle" x="807" y="-222.86" font-family="Times,serif" font-size="14.00" fill="red">on_fail</text>
<path fill="none" stroke="black" d="M800.964,-206.538C832.338,-208.43 877.662,-211.163 912.401,-213.258"/>
<polygon fill="black" stroke="black" points="912.623,-216.778 922.815,-213.886 913.044,-209.791 912.623,-216.778"/>
<text text-anchor="middle" x="866" y="-215.709" font-family="Times,serif" font-size="12.00" fill="gray">fail</text>
</g>
<!-- clean wait&#45;&gt;clean failed -->
<g id="edge27" class="edge"><title>clean wait&#45;&gt;clean failed</title>
<path fill="none" stroke="black" d="M745.331,-202.576C770.118,-196.422 805.512,-190.64 836,-197.06 844.176,-198.782 852.601,-201.71 860.434,-204.995"/>
<polygon fill="black" stroke="black" points="859.082,-208.225 869.639,-209.122 861.945,-201.837 859.082,-208.225"/>
<text text-anchor="middle" x="807" y="-200.86" font-family="Times,serif" font-size="14.00">on_abort</text>
<path fill="none" stroke="black" d="M796.273,-195.531C824.845,-189.071 867.549,-182.634 904,-190.309 912.176,-192.031 920.601,-194.959 928.434,-198.244"/>
<polygon fill="black" stroke="black" points="927.082,-201.474 937.639,-202.371 929.945,-195.086 927.082,-201.474"/>
<text text-anchor="middle" x="866" y="-193.709" font-family="Times,serif" font-size="12.00">abort (via API)</text>
</g>
<!-- clean wait&#45;&gt;cleaning -->
<g id="edge28" class="edge"><title>clean wait&#45;&gt;cleaning</title>
<path fill="none" stroke="black" d="M681.075,-202.113C670.68,-199.237 658.944,-196.489 648,-195.06 619.795,-191.378 611.931,-189.681 584,-195.06 576.71,-196.464 569.158,-198.826 562.072,-201.493"/>
<polygon fill="black" stroke="black" points="560.722,-198.263 552.765,-205.259 563.348,-204.752 560.722,-198.263"/>
<text text-anchor="middle" x="616" y="-198.86" font-family="Times,serif" font-size="14.00">on_resume</text>
<path fill="none" stroke="black" d="M729.336,-195.745C719.352,-193.512 708.29,-191.422 698,-190.309 659.999,-186.202 649.729,-184.187 612,-190.309 603.755,-191.647 595.112,-193.956 587.036,-196.541"/>
<polygon fill="black" stroke="black" points="585.865,-193.242 577.531,-199.783 588.125,-199.867 585.865,-193.242"/>
<text text-anchor="middle" x="655" y="-193.709" font-family="Times,serif" font-size="12.00" fill="gray">resume</text>
</g>
<!-- inspect failed&#45;&gt;manageable -->
<g id="edge34" class="edge"><title>inspect failed&#45;&gt;manageable</title>
<path fill="none" stroke="black" d="M667.369,-59.4999C642.683,-61.7634 611.52,-65.2149 584,-70.0603 504.697,-84.0231 483.502,-85.0702 408,-113.06 399.714,-116.132 391.081,-120.066 383.059,-124.066"/>
<polygon fill="black" stroke="black" points="381.264,-121.054 373.978,-128.746 384.471,-127.276 381.264,-121.054"/>
<text text-anchor="middle" x="528" y="-90.8603" font-family="Times,serif" font-size="14.00">on_manage</text>
<path fill="none" stroke="black" d="M716.918,-53.1014C648.112,-56.9742 513.552,-69.0572 406,-106.309 397.571,-109.229 388.829,-113.136 380.739,-117.164"/>
<polygon fill="black" stroke="black" points="378.871,-114.19 371.599,-121.895 382.089,-120.406 378.871,-114.19"/>
<text text-anchor="middle" x="551" y="-81.7094" font-family="Times,serif" font-size="12.00">manage (via API)</text>
</g>
<!-- inspect failed&#45;&gt;inspecting -->
<g id="edge35" class="edge"><title>inspect failed&#45;&gt;inspecting</title>
<path fill="none" stroke="black" d="M686.081,-41.3399C674.763,-35.7088 661.104,-29.9483 648,-27.0603 624.225,-21.8204 597.123,-21.1925 574.796,-22.041"/>
<polygon fill="black" stroke="black" points="574.395,-18.5564 564.579,-22.5428 574.738,-25.5479 574.395,-18.5564"/>
<text text-anchor="middle" x="616" y="-30.8603" font-family="Times,serif" font-size="14.00">on_inspect</text>
<path fill="none" stroke="black" d="M734.727,-37.0181C723.645,-31.9591 710.52,-26.887 698,-24.3094 665.054,-17.5267 627.033,-17.5072 598.051,-19.0618"/>
<polygon fill="black" stroke="black" points="597.573,-15.5846 587.809,-19.6961 598.006,-22.5712 597.573,-15.5846"/>
<text text-anchor="middle" x="655" y="-27.7094" font-family="Times,serif" font-size="12.00">inspect (via API)</text>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -67,18 +67,62 @@ def main():
if options.filename is None:
options.filename = 'states.%s' % options.format
def node_attrs(state):
"""Attributes used for drawing the nodes (states).
The user can perform actions on stable states (and in a few other
cases), so we distinguish the stable states from the other states by
highlighting the node. Non-stable states are labelled with gray.
This is a callback method used by pydot.convert().
:param state: name of state
:returns: A dictionary with graphic attributes used for displaying
the state.
"""
attrs = map_color(state)
if source.is_stable(state):
attrs['penwidth'] = 1.7
else:
if 'fontcolor' not in attrs:
attrs['fontcolor'] = 'gray'
return attrs
def edge_attrs(start_state, event, end_state):
"""Attributes used for drawing the edges (transitions).
There are two types of transitions; the ones that the user can
initiate and the ones that are done internally by the conductor.
The user-initiated ones are shown with '(via API'); the others are
in gray.
This is a callback method used by pydot.convert().
:param start_state: name of the start state
:param event: the event, a string
:param end_state: name of the end state (unused)
:returns: A dictionary with graphic attributes used for displaying
the transition.
"""
if not options.labels:
return {}
translations = {'delete': 'deleted', 'deploy': 'active'}
attrs = {}
if options.labels:
attrs['label'] = "on_%s" % event
attrs.update(map_color(event))
attrs['fontsize'] = 12
attrs['label'] = translations.get(event, event)
if (source.is_stable(start_state) or 'fail' in start_state
or event in ('abort', 'delete')):
attrs['label'] += " (via API)"
else:
attrs['fontcolor'] = 'gray'
return attrs
source = states.machine
graph_name = '"Ironic states"'
graph_attrs = {'size': 0}
g = pydot.convert(source, graph_name, graph_attrs=graph_attrs,
node_attrs_cb=map_color, edge_attrs_cb=edge_attrs)
node_attrs_cb=node_attrs, edge_attrs_cb=edge_attrs)
print_header(graph_name)
print(g.to_string().strip())