This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script looks for, and fixes problems where zDeviceTemplates was | |
# set as a regular object attribute instead of through the acquisition | |
# mechanism. | |
from Acquisition import aq_base | |
for d in dmd.Devices.getSubDevices(): | |
if hasattr(aq_base(d), 'zCollectorPlugins') and not d.hasProperty('zCollectorPlugins'): | |
print "%s has the problem." % d.id | |
templates = d.zCollectorPlugins | |
del(d.zCollectorPlugins) | |
d._setProperty('zCollectorPlugins', templates) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configure | |
xmlns="http://namespaces.zope.org/zope" | |
xmlns:browser="http://namespaces.zope.org/browser"> | |
<include package="Products.Five" file="meta.zcml"/> | |
<include package="zope.viewlet" file="meta.zcml"/> | |
<include package="Products.ZenModel" file="permissions.zcml"/> | |
<browser:viewlet | |
name="Reports" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import Globals | |
from transaction import commit | |
from Products.ZenUtils.ZenScriptBase import ZenScriptBase | |
dmd = ZenScriptBase(connect=True).dmd | |
if len(sys.argv) < 3: | |
print "Usage: %s <source_user> <destination_user>" % (sys.argv[0],) | |
sys.exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import Globals | |
from Products.ZenUtils.ZenScriptBase import ZenScriptBase | |
class MyTool(ZenScriptBase): | |
def buildOptions(self): | |
super(MyTool, self).buildOptions() | |
self.parser.add_option( |