ZenDMD Tips - Impact

From Zenoss Wiki
Revision as of 12:59, 30 September 2015 by Bunyk (Talk | contribs) (Created page with "To reindex impact relations for all devices for all components: <syntaxhighlight lang="python"> from zope.event import notify from Products.Zuul.catalog.events import Indexin...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To reindex impact relations for all devices for all components:

from zope.event import notify
from Products.Zuul.catalog.events import IndexingEvent
 
for device in dmd.Devices.getSubDevicesGen():
    notify(IndexingEvent(device))
    for component in device.getDeviceComponents():
        notify(IndexingEvent(component))
 
commit()