Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 34 # Try SNMP first
- 35 if self.has_snmp():
- 36 try:
- 37 for v in self.snmp.get_tables(
- 38 ["1.2.840.10006.300.43.1.1.1.1.6",
- 39 "1.2.840.10006.300.43.1.1.2.1.1",
- 40 "1.2.840.10006.300.43.1.1.1.1.5"], bulk=True):
- 41 ==> port = 'Po' + v[1]
- 42 s = self.hex_to_bin(v[2])
- 43 members = []
- 44 for i in range(len(s)):
- 45 if s[i] == '1':
- 46 oid = "1.3.6.1.2.1.31.1.1.1.1." + str(i + 1)
- 47 iface = self.snmp.get(oid, cached=True) # IF-MIB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement