Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if evt.summary.startswith('threshold of operational status '):
- d = dmd.Devices.findDevice(evt.ipAddress)
- if evt.severity > 0:
- evt.summary = "interface operationally down"
- for interface in d.os.interface():
- if interface.getInterfaceName() == evt.component:
- interface.operStatus = 2
- else:
- evt.summary = "interface operationally up"
- for interface in d.os.interface():
- if interface.getInterfaceName() == evt.component:
- interface.operStatus = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement