本文整理汇总了Python中Products.ZenModel.ZenPack.ZenPackBase.remove方法的典型用法代码示例。如果您正苦于以下问题:Python ZenPackBase.remove方法的具体用法?Python ZenPackBase.remove怎么用?Python ZenPackBase.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products.ZenModel.ZenPack.ZenPackBase
的用法示例。
在下文中一共展示了ZenPackBase.remove方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, junk):
ZenPackBase.remove(self, app, junk)
if hasattr(self.dmd.zenMenus, "Database"):
self.dmd.zenMenus._delObject("Database")
OperatingSystem._relations = tuple([x for x in OperatingSystem._relations if x[0] != "softwaredatabases"])
for d in self.dmd.Devices.getSubDevices():
d.os.buildRelations()
示例2: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, leaveObjects=False):
for dcp in self.dcProperties.keys():
try:
dc = app.zport.dmd.Devices.getOrganizer(dcp)
dc._delProperty('zCollectorPlugins')
except: continue
ZenPackBase.remove(self, app, leaveObjects)
示例3: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, junk):
ZenPackBase.remove(self, app, junk)
OperatingSystem._relations = tuple(
[x for x in OperatingSystem._relations
if x[0] not in ['lldplinks', ]])
for d in self.dmd.Devices.getSubDevices():
d.os.buildRelations()
示例4: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, leaveObjects=False):
# Delete only suborganizer /Storage/Qsan
if hasattr(app.zport.dmd.Devices, 'Storage') and \
hasattr(app.zport.dmd.Devices.Storage, 'Qsan'):
app.zport.dmd.Devices.manage_deleteOrganizer('/Storage/Qsan')
ZenPackBase.remove(self, app, leaveObjects)
示例5: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, leaveObjects=False ):
"""
Remove the ZenPack from Zenoss
"""
# NB: As of Zenoss 2.2, this function now takes three arguments.
ZenPackBase.remove(self, app, leaveObjects)
zpm = app.zport.ZenPortletManager
zpm.unregister_portlet('myDeviceIssuesPortlet')
示例6: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, junk):
ZenPackBase.remove(self, app, junk)
if hasattr(self.dmd.Reports, 'Device Reports'):
devReports = self.dmd.Reports['Device Reports']
if hasattr(devReports, 'Snmp Reports'):
devReports._delObject('Snmp Reports')
OperatingSystem._relations = tuple([x for x in OperatingSystem._relations if x[0] not in ['snmpCommand']])
for d in self.dmd.Devices.getSubDevices():
d.os.buildRelations()
示例7: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, leaveObjects=False):
pct = app.zport.dmd.Monitors.rrdTemplates.PerformanceConf
for gdn, dpn, stacked, format in self._gdmap:
gd = getattr(pct.graphDefs, gdn, None)
if not gd: continue
gd.manage_deleteGraphPoints(['zenperfsql'])
if hasattr(pct.datasources, 'zenperfsql'):
pct.manage_deleteRRDDataSources(['zenperfsql'])
ZenPackBase.remove(self, app, leaveObjects)
示例8: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, leaveObjects=False):
dc = app.zport.dmd.Devices.getOrganizer('Network/Router/Cisco')
cpl = list(getattr(dc, 'zCollectorPlugins'))
for plugin in self.newplugins:
if plugin in cpl: cpl.remove(plugin)
dc.zCollectorPlugins = list(cpl)
ZenPackBase.remove(self, app, leaveObjects)
if hasattr(self.dmd.Reports, 'Device Reports'):
devReports = self.dmd.Reports['Device Reports']
if hasattr(devReports, 'Cisco Reports'):
devReports._delObject('Cisco Reports')
示例9: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove( self, app, leaveObjects=False):
#
# On ZenPack remove, delete role ZenOperator
#
self.removeZenOperatorRole(app.zport)
#
# Remove ZenCommon role
#
self.removeZenCommonRole(app.zport)
ZenPackBase.remove( self, app, leaveObjects=False )
示例10: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, junk):
"""
Delete the top-level menu.
"""
ZenPackBase.remove(self, app, junk)
if hasattr(self.dmd.zenMenus, 'MessageQueues'):
self.dmd.zenMenus._delObject('MessageQueues')
OperatingSystem._relations = tuple([x for x in
OperatingSystem._relations if x[0]
!= 'msmq'])
for d in self.dmd.Devices.getSubDevices():
d.os.buildRelations()
示例11: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, leaveObjects=False):
for dcp in self.dcProperties.keys():
try:
dc = app.zport.dmd.Devices.getOrganizer(dcp)
dc._delProperty('zCollectorPlugins')
dc._delProperty('zPythonClass')
dc._delProperty('zSnmpMonitorIgnore')
except: continue
ZenPackBase.remove(self, app, leaveObjects)
if hasattr(self.dmd.Reports, 'Device Reports'):
devReports = self.dmd.Reports['Device Reports']
if hasattr(devReports, 'SMI-S Reports'):
devReports._delObject('SMI-S Reports')
示例12: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, leaveObjects=False):
"""
Remove the collector plugins.
"""
ZenPackBase.remove(self, app, leaveObjects)
if not leaveObjects:
try:
# Using findChild here to avoid finding /Server/Linux
# accidentally via acquisition.
linux = app.dmd.findChild('Devices/Server/SSH/Linux')
linux.zCollectorPlugins = []
except AttributeError:
# No /Server/SSH/Linux device class to remove.
pass
示例13: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, leaveObjects=False):
# Remove the symlink to the bot daemon
cdSymLink = zenPath('bin', 'xmppBot')
if os.path.exists(cdSymLink):
os.remove(cdSymLink)
# call parent zenpack uninstall function
ZenPackBase.remove(self, app, leaveObjects)
# remove JabberID user propery
for user in self.dmd.ZenUsers.getAllUserSettings():
if user.hasProperty('JabberId'):
user.manage_delProperty('JabberId')
transaction.commit()
示例14: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, leaveObjects=False):
"""
Remove the collector plugins.
"""
ZenPackBase.remove(self, app, leaveObjects)
ubuntu = findUbuntu(app.dmd)
if not leaveObjects:
newlist=[]
for plugin in ubuntu.zCollectorPlugins:
if plugin == "zenoss.cmd.linux.ubuntu_aptitude":
pass
elif plugin == "zenoss.cmd.linux.ubuntu_uname_a":
newlist.append("zenoss.cmd.uname_a")
else:
newlist.append(plugin)
ubuntu.zCollectorPlugins = newlist
示例15: remove
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import remove [as 别名]
def remove(self, app, leaveObjects=False):
"""
Remove the collector plugins.
"""
ZenPackBase.remove(self, app, leaveObjects)
mandriva = findMandriva(app.dmd)
if not leaveObjects:
newlist = []
for plugin in mandriva.zCollectorPlugins:
if plugin == "zenoss.cmd.linux.mandriva_rpm":
pass
elif plugin == "zenoss.cmd.linux.mandriva_uname_a":
newlist.append("zenoss.cmd.uname_a")
else:
newlist.append(plugin)
mandriva.zCollectorPlugins = newlist