0
0
Fork 0
mirror of https://github.com/alerta/alerta.git synced 2025-01-26 02:08:31 +00:00
alerta_alerta/alerta/ucs/daemon.py
Nick Satterly d33b1df5b0 stuff
2013-03-05 17:29:08 +00:00

28 lines
489 B
Python

import UcsSdk
import time
def EventHandler(mce):
print 'Received a New Event with ClassId: ' + str(mce.mo.classId)
print "ChangeList: ", mce.changeList
print "EventId: ", mce.eventId
def main():
ucs = UcsSdk.UcsHandle()
ucs.UcsHandle.Login(username='', password='')
ucs.UcsHandle.AddEventHandler(classId='', callBack=EventHandler)
while True:
print '.',
time.sleep(5)
ucs.UcsHandle.Logout()
if __name__ == '__main__':
main()