当前位置: 首页>>代码示例>>Python>>正文


Python ZenPackBase.remove方法代码示例

本文整理汇总了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()
开发者ID:eedgar,项目名称:Community-Zenpacks,代码行数:9,代码来源:__init__.py

示例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)
开发者ID:cluther,项目名称:Community-Zenpacks,代码行数:9,代码来源:__init__.py

示例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()
开发者ID:alecsandrb,项目名称:Community-Zenpacks,代码行数:9,代码来源:__init__.py

示例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)
开发者ID:CERIT-SC,项目名称:ZenPacks.CERIT_SC.Qsan,代码行数:9,代码来源:__init__.py

示例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')
开发者ID:alecsandrb,项目名称:Community-Zenpacks,代码行数:10,代码来源:__init__.py

示例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()
开发者ID:jcurry,项目名称:ZenPacks.skills1st.snmpExtend,代码行数:11,代码来源:__init__.py

示例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)
开发者ID:alienth,项目名称:ZenPacks.community.SQLDataSource,代码行数:11,代码来源:__init__.py

示例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')
开发者ID:BillTheBest,项目名称:Community-Zenpacks,代码行数:13,代码来源:__init__.py

示例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 )
开发者ID:jcurry,项目名称:ZenPacks.skills1st.UserRoles,代码行数:13,代码来源:__init__.py

示例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()
开发者ID:alecsandrb,项目名称:Community-Zenpacks,代码行数:14,代码来源:__init__.py

示例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')
开发者ID:epuzanov,项目名称:ZenPacks.community.SMISMon,代码行数:15,代码来源:__init__.py

示例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
开发者ID:jshroads,项目名称:ZenPacks.zenoss.LinuxMonitor,代码行数:16,代码来源:__init__.py

示例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()
开发者ID:BillTheBest,项目名称:Community-Zenpacks,代码行数:17,代码来源:__init__.py

示例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
开发者ID:alecsandrb,项目名称:Community-Zenpacks,代码行数:19,代码来源:__init__.py

示例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
开发者ID:anksp21,项目名称:Community-Zenpacks,代码行数:19,代码来源:__init__.py


注:本文中的Products.ZenModel.ZenPack.ZenPackBase.remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。