Advertisement
Guest User

Untitled

a guest
Jul 28th, 2009
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. if evt.summary.startswith('threshold of operational status '):
  2.     d = dmd.Devices.findDevice(evt.ipAddress)
  3.     if evt.severity > 0:
  4.         evt.summary = "interface operationally down"
  5.         for interface in d.os.interface():
  6.             if interface.getInterfaceName() == evt.component:
  7.                 interface.operStatus = 2
  8.     else:
  9.         evt.summary = "interface operationally up"
  10.         for interface in d.os.interface():
  11.             if interface.getInterfaceName() == evt.component:
  12.                 interface.operStatus = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement