ZenDMD Tip - Test & Delete Overrides

From Zenoss Wiki
Revision as of 03:15, 31 October 2015 by Hackman238 (Talk | contribs)$7

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

As the zenoss user on the ZenMaster, zendmd.

For classes:

for d in dmd.Devices.getSubOrganizers():
    if d.getOverriddenObjects('zDeviceTemplates'): d.id

For devices:

for d in dmd.Devices.getSubDevices():
    if d.getOverriddenObjects('zDeviceTemplates'): d.id

To remove the property, use the 'deleteZenProperty' method as follows:

d.deleteZenProperty('zDeviceTemplates')

Change out the 'zDeviceTemplates' in the examples to the property you need to work with.