xentaur

diff xentaur.py @ 39:54b7c7ae50ec

brodge-bridge link visualisation
author igor
date Fri Sep 28 13:35:54 2007 +0300 (2007-09-28)
parents f71b298798c2
children 10444acb35f4
line diff
     1.1 --- a/xentaur.py	Fri Sep 28 13:03:15 2007 +0300
     1.2 +++ b/xentaur.py	Fri Sep 28 13:35:54 2007 +0300
     1.3 @@ -124,10 +124,6 @@
     1.4              if not [ host, bridges_raw.index(this_bridge), this_bridge ] in temporary_links:
     1.5                  links.append(host+" -- "+this_bridge+" [taillabel=\"fa"+str(bridges_raw.index(this_bridge))+"/0\"]")
     1.6                  i+=1
     1.7 -       #         if [ host, this_bridge ] in broken_links:
     1.8 -       #             links.append(host+" -- "+this_bridge+" [taillabel=\"fa"+str(i)+"/0\",style=dashed]")
     1.9 -       #         else:
    1.10 -       #             links.append(host+" -- "+this_bridge+" [taillabel=\"fa"+str(i)+"/0\"]")
    1.11  
    1.12      for link in temporary_links:
    1.13          links.append(link[0]+" -- "+link[2]+" [taillabel=\"fa"+str(link[1])+"/0\",color=blue,len=10,w=5,weight=5]")
    1.14 @@ -135,6 +131,19 @@
    1.15      for link in broken_links:
    1.16          links.append(link[0]+" -- "+link[2]+" [taillabel=\"fa"+str(link[1])+"/0\",style=dashed]")
    1.17  
    1.18 +
    1.19 +    # bridge-bridge links
    1.20 +    for host, bridges_raw in bridge_bridge_table.iteritems():
    1.21 +        i=0
    1.22 +        for this_bridge in bridges_raw:
    1.23 +            if this_bridge in hidden_bridges or not this_bridge:
    1.24 +                continue 
    1.25 +            if not [ host, bridges_raw.index(this_bridge), this_bridge ] in temporary_links:
    1.26 +                links.append(host+" -- "+this_bridge)
    1.27 +                i+=1
    1.28 +
    1.29 +
    1.30 +
    1.31      linklist=";\n    ".join(links)
    1.32  
    1.33      graph_dot = {