Quantcast
Channel: Zenoss Community: Message List
Viewing all articles
Browse latest Browse all 1097

Re: Maintenance Windows not changing production state

$
0
0

With the help of Hackman238, finally got this issue resolved. Was due to a couple maintenance windows being "broken" (somehow). This was the code that was used to find and fix the problem:

 

for mw in devices.maintenanceWindowSearch():

    try:

        mw = mw.getObject()

        mw.productionState()

    except:

        print "problem is %s going to delete it" % (mw.id)

        mwp = mw.getPrimaryParent()

        mw.unindex_object()

        mwp.removeRelation(mw)

        commit()

        pass

 

Courtest of Hackman238 (Shane Scott)

 

EDIT:

Couldn't figure out how to make code tags work here.


Viewing all articles
Browse latest Browse all 1097

Trending Articles