Changeset 10081 in genesis
- Timestamp:
- Mar 10, 2012, 2:21:41 PM (13 years ago)
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
nodes/CNodeCeTIM2/wleiden.yaml
r10074 r10081 56 56 ssid : "ap-wirelessleiden-hooglandsekerk" 57 57 dhcp : "10-60" 58 bridge_type: "NanoStation2 L"58 bridge_type: "NanoStation2" 59 59 compass : "None" 60 60 ns_ip : "172.17.139.2/26" -
nodes/CNodeStadhuis/wleiden.yaml
r10074 r10081 153 153 ssid : "ap-wirelessleiden-atrium" 154 154 dhcp : "10-250" 155 bridge_type: "NanoStation2 L"155 bridge_type: "NanoStation2" 156 156 compass : "None" 157 157 ns_ip : "172.17.141.2/26" -
nodes/CNodeUniGor1/wleiden.yaml
r10074 r10081 56 56 ssid : "il-zo.unigor1.wleiden.net" 57 57 dhcp : "no" 58 bridge_type: "NanoStation5" 58 59 compass : "se" 59 60 ns_ip : "172.16.3.186/29" -
nodes/CNodeWatertoren1/wleiden.yaml
r10074 r10081 71 71 ssid : "il-no.cetim1.wleiden.net" 72 72 dhcp : "no" 73 bridge_type: "NanoStation5" 73 74 compass : "ne" 74 75 ns_ip : "172.16.16.99/29" -
nodes/CNodeWatertoren2/wleiden.yaml
r10074 r10081 53 53 ssid : "il-nw.watertoren2.wleiden.net" 54 54 dhcp : "no" 55 bridge_type: "NanoStation5" 55 56 compass : "nw" 56 57 ns_ip : "172.16.16.90/29" -
tools/check-batch-cmd
r10075 r10081 7 7 # 8 8 import gformat 9 import netsnmp 10 import paramiko 11 import socket 9 12 import sys 10 import socket 11 import paramiko 13 14 netsnmp.verbose = 0 12 15 13 16 class CmdError(Exception): … … 30 33 31 34 def 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'])) 35 39 36 40 sess = netsnmp.Session(Version=1, DestHost=host, Community='public', Timeout=2 * 100000, Retries=0) … … 38 42 if sess.ErrorInd < 0: 39 43 raise CmdError('[%(ErrorInd)s] %(ErrorStr)s' % vars(sess)) 40 return retval[0]44 return filter(None, retval)[0] 41 45 42 46 … … 66 70 if sys.argv[1:]: 67 71 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.