# this script prints out all maint windows that will run in the future
# to run zendmd < getMaintWindows.py
# Michael Nugent, michael.nugent@zvents.com
#for epoch -> human time conversion
import time
#note, you must have at least 1 device
device = find('*')
mw = device.maintenanceWindowSearch()
mresult = []
for m in mw:
ob = m.getObject()
mresult.append(ob)
for n in mresult:
if(n.enabled and n.repeat != 'Never'):
print n.name
print time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.localtime(n.start))
print n.duration
print n.repeat
print n.breadCrumbs()
print "------------------------"