Changeset 12479 in genesis for tools


Ignore:
Timestamp:
Oct 18, 2013, 8:10:20 PM (11 years ago)
Author:
rick
Message:

Correcties om graph van nodes te maken.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/make-network-graph.py

    r11753 r12479  
    6666          link_data[addr] = 1
    6767          iface = datadump[iface_key]['autogen_ifname']
    68           print nodename, iface
    6968          INTERVAL = 60 * 10
    7069          if store['uptime'].has_key(nodename) and store['snmp'].has_key(nodename) and store['traffic'].has_key(nodename):
     
    7776              link_data[addr] = retval
    7877
    79           print "### %s [%s] is of type %s" % (gformat.showaddr(addr), iface_key, link_type[addr])
     78          print "### ... %s %s [%s] is of type %s" % (iface, gformat.showaddr(addr), iface_key, link_type[addr])
    8079  except (KeyError, ValueError), e:
    8180    print "[FOUT] in '%s' interface '%s'" % (host,iface_key)
     
    9594edge [ fontsize = 10, ]
    9695"""
    97   for node, datadump in nodes.iteritems():
     96  for node in sorted(nodes.keys()):
     97    datadump = nodes[node]
     98    print "# Processing node:", node
    9899    lines = [node]
    99100    for ik in datadump['autogen_iface_keys']:
     101      print "# .. ", ik
    100102      if 'alias' in ik or 'wlan' in datadump[ik]['autogen_ifname']:
    101103        continue
Note: See TracChangeset for help on using the changeset viewer.