Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hostname IF-MIB::ifDescr.1 = GigabitEthernet0/0/0<br/>
- hostname IF-MIB::ifAlias.1 = --> InterfaceDesc<br/>
- hostname IF-MIB::ifOperStatus.1 = 'up'<br/>
- hostname IF-MIB::ifDescr.2 = GigabitEthernet0/0/1<br/>
- hostname IF-MIB::ifAlias.2 = --> InterfaceDesc<br/>
- hostname IF-MIB::ifOperStatus.2 = 'up'<br/>
- hostname IF-MIB::ifDescr.3 = GigabitEthernet0/0/2<br/>
- hostname IF-MIB::ifAlias.3 = --> InterfaceDesc<br/>
- hostname IF-MIB::ifOperStatus.3 = 'up'<br/>
- hostname interface interface desc status
- hostname GigabitEthernet0/0/0 InterfaceDesc up
- hostname GigabitEthernet0/0/1 InterfaceDesc up
- hostname GigabitEthernet0/0/2 InterfaceDesc up
- for errorIndication, errorStatus, errorIndex, varBinds in snmp_iter:
- # Check for errors and print out results
- if errorIndication:
- print(errorIndication)
- elif errorStatus:
- print('%s at %s' % (errorStatus.prettyPrint(),
- errorIndex and varBinds[int(errorIndex) - 1][0] or '?'))
- else:
- for varBind in varBinds:
- print(hostip),
- print(' = '.join([x.prettyPrint() for x in varBind]))
Add Comment
Please, Sign In to add comment