Changeset 10081 in genesis


Ignore:
Timestamp:
Mar 10, 2012, 2:21:41 PM (13 years ago)
Author:
rick
Message:

New bridges found using snmp queries (much faster).

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • nodes/CNodeCeTIM2/wleiden.yaml

    r10074 r10081  
    5656  ssid       : "ap-wirelessleiden-hooglandsekerk"
    5757  dhcp       : "10-60"
    58   bridge_type: "NanoStation2 L"
     58  bridge_type: "NanoStation2"
    5959  compass    : "None"
    6060  ns_ip      : "172.17.139.2/26"
  • nodes/CNodeStadhuis/wleiden.yaml

    r10074 r10081  
    153153  ssid       : "ap-wirelessleiden-atrium"
    154154  dhcp       : "10-250"
    155   bridge_type: "NanoStation2 L"
     155  bridge_type: "NanoStation2"
    156156  compass    : "None"
    157157  ns_ip      : "172.17.141.2/26"
  • nodes/CNodeUniGor1/wleiden.yaml

    r10074 r10081  
    5656  ssid       : "il-zo.unigor1.wleiden.net"
    5757  dhcp       : "no"
     58  bridge_type: "NanoStation5"
    5859  compass    : "se"
    5960  ns_ip      : "172.16.3.186/29"
  • nodes/CNodeWatertoren1/wleiden.yaml

    r10074 r10081  
    7171  ssid       : "il-no.cetim1.wleiden.net"
    7272  dhcp       : "no"
     73  bridge_type: "NanoStation5"
    7374  compass    : "ne"
    7475  ns_ip      : "172.16.16.99/29"
  • nodes/CNodeWatertoren2/wleiden.yaml

    r10074 r10081  
    5353  ssid       : "il-nw.watertoren2.wleiden.net"
    5454  dhcp       : "no"
     55  bridge_type: "NanoStation5"
    5556  compass    : "nw"
    5657  ns_ip      : "172.16.16.90/29"
  • tools/check-batch-cmd

    r10075 r10081  
    77#
    88import gformat
     9import netsnmp
     10import paramiko
     11import socket
    912import sys
    10 import socket
    11 import paramiko
     13
     14netsnmp.verbose = 0
    1215
    1316class CmdError(Exception):
     
    3033
    3134def get_bridge_type(host):
    32   import netsnmp
    33   netsnmp.verbose = 0
    34   var_list = netsnmp.VarList(netsnmp.Varbind('.1.2.840.10036.3.1.2.1.3.6'))
     35  """ Both NS and NS Mx uses a slighly different OID"""
     36  var_list = netsnmp.VarList(
     37   *map(lambda x: netsnmp.Varbind(x),
     38    ['.1.2.840.10036.3.1.2.1.3.6', '.1.2.840.10036.3.1.2.1.3.7']))
    3539 
    3640  sess = netsnmp.Session(Version=1, DestHost=host, Community='public', Timeout=2 * 100000, Retries=0)
     
    3842  if sess.ErrorInd < 0:
    3943    raise CmdError('[%(ErrorInd)s] %(ErrorStr)s' % vars(sess))
    40   return retval[0]
     44  return filter(None, retval)[0]
    4145
    4246
     
    6670  if sys.argv[1:]:
    6771    for host in sys.argv[1:]:
    68       check_host(host)
    69   main()
     72      print get_bridge_type(host)
     73  else:
     74    main()
Note: See TracChangeset for help on using the changeset viewer.