Difference between revisions of "ZenDMD Tip - ShowAllTransforms"

From Zenoss Wiki
Jump to: navigation, search
m (Formatting fixes)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<syntaxhighlight lang=javascript>
+
<syntaxhighlight lang=python>
#!/usr/bin/env pythonimport Globals
+
#!/usr/bin/env python
 +
import Globals
 
from Products.ZenUtils.ZenScriptBase import ZenScriptBase
 
from Products.ZenUtils.ZenScriptBase import ZenScriptBase
 
dmd = ZenScriptBase(connect=True).dmd
 
dmd = ZenScriptBase(connect=True).dmd
Line 16: Line 17:
  
 
[[Category:Tips]]
 
[[Category:Tips]]
 +
[[Category:ZenDMD]]

Latest revision as of 14:17, 20 November 2013

#!/usr/bin/env python
import Globals
from Products.ZenUtils.ZenScriptBase import ZenScriptBase
dmd = ZenScriptBase(connect=True).dmd
for ec in dmd.Events.getSubOrganizers():
    if ec.transform:
        print "= %s ===" % ec.getOrganizerName()
        print ec.transform        
        print    
    for i in ec.instances():
        if i.transform:
            print "= %s/%s ===" % (ec.getOrganizerName(), i.id)
            print i.transform
            print