Skip to content

Instantly share code, notes, and snippets.

@cluther
Created September 24, 2013 21:29
Show Gist options
  • Select an option

  • Save cluther/6691527 to your computer and use it in GitHub Desktop.

Select an option

Save cluther/6691527 to your computer and use it in GitHub Desktop.
Report of all Zenoss transforms.
#!/usr/bin/env zendmd
output = open('transforms.txt', 'w')
for ec in [dmd.Events] + dmd.Events.getSubOrganizers():
if ec.transform:
print >> output, "%s" % ec.getOrganizerName()
print >> output, "-"*len(ec.getOrganizerName())
print >> output, ec.transform
print >> output
for mapping in ec.instances():
if not mapping.transform: continue
print >> output, "%s/%s" % (ec.getOrganizerName(), mapping.id)
print >> output, "-"*len("%s/%s" % (ec.getOrganizerName(), mapping.id))
print >> output, mapping.transform
print >> output
output.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment