- Timestamp:
- Oct 19, 2013, 10:09:17 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/make-network-graph.py
r12479 r12486 2 2 # vim:ts=2:et:sw=2:ai 3 3 # 4 # 4 5 # Build topological network graph 6 # 5 7 # Rick van der Zwet <info@rickvanderzwet.nl> 8 # 6 9 import gformat 7 10 import glob … … 14 17 15 18 OUTFILE = os.path.join(os.getcwd(),'network.png') 19 LINK_SPECIFIC = False 16 20 17 21 try: … … 35 39 try: 36 40 for host in gformat.get_hostlist(): 41 # Filter should be proper argument 37 42 if not pass_filter(host): 38 43 continue … … 128 133 for index,lid in enumerate(leden[:-1]): 129 134 for buur in leden[index + 1:]: 130 print >> f,' %s -> %s [color="%s", weight="%s", style="setlinewidth(%s)"]' % (lid, buur, color, weight, width) 135 if LINK_SPECIFIC: 136 print >> f,' %s -> %s [color="%s", weight="%s", style="setlinewidth(%s)"]' % (lid, buur, color, weight, width) 137 else: 138 print >> f,' %s -> %s [color="%s", weight="%s", style="setlinewidth(%s)"]' % (lid.split(':')[0], buur.split(':')[0], color, weight, width) 131 139 print >> f, "}" 132 140 f.flush()
Note:
See TracChangeset
for help on using the changeset viewer.