diff options
author | Joshua Harlow <harlowja@gmail.com> | 2015-02-21 19:39:03 -0800 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2015-02-23 16:11:04 -0800 |
commit | cc31c0c5246a526e31f518732a9cd959fb1144f1 (patch) | |
tree | 8369e1edc21157c0a9efa6ac3712f13ba407018c /tools | |
parent | b073db6ca0da75421f24418477278e801a8c0062 (diff) | |
download | ironic-cc31c0c5246a526e31f518732a9cd959fb1144f1.tar.gz |
Update the states generator and regenerate the image
Change-Id: I9ab9bd12547367ab65f225618aa6c4163645fb03
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/states_to_dot.py | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/tools/states_to_dot.py b/tools/states_to_dot.py index fd7a2ce5e..75f46fc9a 100755 --- a/tools/states_to_dot.py +++ b/tools/states_to_dot.py @@ -36,8 +36,8 @@ def print_header(text): def map_color(text): - # If the text contains 'error' then we'll return red... - if 'error' in text: + # If the text contains 'error'/'fail' then we'll return red... + if 'error' in text or 'fail' in text: return 'red' else: return None @@ -69,8 +69,8 @@ def main(): graph_name = "Ironic states" g = pydot.Dot(graph_name=graph_name, rankdir='LR', nodesep='0.25', overlap='false', - ranksep="0.5", size="11x8.5", - splines='true', ordering='in') + ranksep="0.5", splines='true', + ordering='in') node_attrs = { 'fontsize': '11', } @@ -101,17 +101,6 @@ def main(): g.add_edge(pydot.Edge(nodes[start_state], nodes[end_state], **edge_attrs)) - # Make nice start states... - starts = [ - format_state(source.start_state), - ] - for i, s in enumerate(starts): - name = "__start_%s__" % i - start = pydot.Node(name, shape="point", width="0.1", - xlabel='start', fontcolor='green', **node_attrs) - g.add_node(start) - g.add_edge(pydot.Edge(start, nodes[s], style='dotted')) - print_header(graph_name) print(g.to_string().strip()) |