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


Python ZenPack.ZenPackBase类代码示例

本文整理汇总了Python中Products.ZenModel.ZenPack.ZenPackBase的典型用法代码示例。如果您正苦于以下问题:Python ZenPackBase类的具体用法?Python ZenPackBase怎么用?Python ZenPackBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ZenPackBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: remove

 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,代码行数:7,代码来源:__init__.py

示例2: install

    def install(self, zport):
        """
        Set the collector plugin
        """
        ZenPackBase.install(self, zport)

	setuphandlers.install(zport, self)
开发者ID:zenoss,项目名称:ZenPacks.oie.KannelMonitor,代码行数:7,代码来源:__init__.py

示例3: remove

    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,代码行数:7,代码来源:__init__.py

示例4: upgrade

 def upgrade(self, app):
     for devClass, properties in self.dcProperties.iteritems():
         self.addDeviceClass(app, devClass, properties)
     ZenPackBase.upgrade(self, app)
     for d in self.dmd.Devices.getSubDevices():
         d.hw.buildRelations()
         d.os.buildRelations()
开发者ID:epuzanov,项目名称:ZenPacks.community.CIMMon,代码行数:7,代码来源:__init__.py

示例5: upgrade

 def upgrade(self, app):
     if hasattr(self.dmd.zenMenus, "Database"):
         self.dmd.zenMenus._delObject("Database")
     self.dmd.zenMenus.manage_addZenMenu("Database")
     ZenPackBase.upgrade(self, app)
     for d in self.dmd.Devices.getSubDevices():
         d.os.buildRelations()
开发者ID:eedgar,项目名称:Community-Zenpacks,代码行数:7,代码来源:__init__.py

示例6: install

    def install(self, app):
        """Initial installation of the ZenPack """

        self._add_events()

        ZenPackBase.install(self, app)
        self._registerPortlet(app)
开发者ID:g-k,项目名称:ZenPacks.community.Supervisor,代码行数:7,代码来源:__init__.py

示例7: upgrade

    def upgrade(self, app):
        """ Upgrading the ZenPack procedures """

        self._add_events()

        ZenPackBase.upgrade(self, app)
        self._registerPortlet(app)
开发者ID:g-k,项目名称:ZenPacks.community.Supervisor,代码行数:7,代码来源:__init__.py

示例8: install

    def install(self, app):
        if not hasattr(self.dmd.Devices.Server, 'NetWare'):
            manage_addDeviceClass(self.dmd.Devices.Server, 'NetWare')
        dc = self.dmd.Devices.Server.NetWare
        dc.description = 'Novell NetWare Servers'
#        dc.devtypes = ['SNMP',]
        dc.zIcon = '/zport/dmd/server-netware.png'
        dc.zLinks = "<a href='https://${here/manageIp}:8009' target='_'>Novell Remote Manager</a> <a href='https://${here/manageIp}/nps' target='_'>iManager</a>"
        dc.zCollectorPlugins = tuple(self.dmd.Devices.Server.zCollectorPlugins) + (
                                                            'community.snmp.NWDeviceMap',
                                                            'community.snmp.NWFileSystemMap')
        if not hasattr(self.dmd.Devices.Server.NetWare, 'NCS'):
            manage_addDeviceClass(self.dmd.Devices.Server.NetWare, 'NCS')
        nwcs = self.dmd.Devices.Server.NetWare.NCS
        nwcs.description = 'Novell Cluster Virtual Resources'
#        nwcs.devtypes = ['SNMP',]
        nwcs.zCollectorPlugins = ('zenoss.snmp.NewDeviceMap',
                                'zenoss.snmp.DeviceMap',
                                'zenoss.snmp.IpServiceMap',
                                'zenoss.snmp.HRSWRunMap',
                                'community.snmp.Interface2IPMap',
                                'community.snmp.NWFileSystemMap',
                                )
        ZenPackBase.install(self, app)
        dc.zNWFileSystemMapIncludeNames = '^SYS'
        nwcs.zNWFileSystemMapIncludeNames = '^VOLUME_NAME'
开发者ID:alecsandrb,项目名称:Community-Zenpacks,代码行数:26,代码来源:__init__.py

示例9: install

    def install(self, app):
        """
        Set the collector plugins for Server/SSH/Linux.
        """
        linux = app.dmd.Devices.createOrganizer('/Server/SSH/Linux')
        linux.setZenProperty( 'zCollectorPlugins', 
                              ['zenoss.cmd.uname',
                               'zenoss.cmd.uname_a',
                               'zenoss.cmd.linux.cpuinfo', 
                               'zenoss.cmd.linux.memory', 
                               'community.cmd.linux.ip', 
                               'community.cmd.linux.netstat_an', 
                               'zenoss.cmd.linux.netstat_rn', 
                               'zenoss.cmd.linux.process',
                               'community.cmd.linux.df',
                               'community.cmd.linux.lsb_release',
                               'community.cmd.linux.dmidecode',
                               'community.cmd.linux.sys_block',
                               'community.cmd.linux.mdstat',
                               'community.cmd.linux.lspci',
                               'community.cmd.linux.sw.dpkg',
                               'community.cmd.linux.sw.rpm' ] ) 
        
        linux.register_devtype('Linux Server', 'SSH')

        # fix zHardDiskMapMatch for /Server/SSH/Linux
        hdProp = linux.getProperty('zHardDiskMapMatch')
        if not hdProp or hdProp == ZHD_OLD:
            linux.setZenProperty('zHardDiskMapMatch', ZHD_NEW)

        ZenPackBase.install(self, app)
开发者ID:CERIT-SC,项目名称:ZenPacks.zenoss.LinuxMonitor,代码行数:31,代码来源:__init__.py

示例10: remove

 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,代码行数:7,代码来源:__init__.py

示例11: remove

 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,代码行数:7,代码来源:__init__.py

示例12: install

    def install(self, app):
        ZenPackBase.install(self, app)
        log.info("Starting installation of ZenPacks.TwoNMS.Rancid (rancid v" + self.RANCID_VERSION + ")")
        self.install_rancid(app)

        for d in self.dmd.Devices.getSubDevices():
            d.os.buildRelations()
开发者ID:bodyakov,项目名称:ZenPacks.TwoNMS.Rancid,代码行数:7,代码来源:__init__.py

示例13: upgrade

    def upgrade(self, app):
        if hasattr(self.dmd.Reports, 'Device Reports'):
            devReports = self.dmd.Reports['Device Reports']
            rClass = devReports.getReportClass()
	    if not hasattr(devReports, 'Dell PowerEdge Reports'):
                dc = rClass('Dell PowerEdge Reports', None)
                devReports._setObject('Dell PowerEdge Reports', dc)
        ZenPackBase.upgrade(self, app)
开发者ID:BillTheBest,项目名称:Community-Zenpacks,代码行数:8,代码来源:__init__.py

示例14: install

    def install(self, app):
        if hasattr(self.dmd.Reports, 'Device Reports'):
            devReports = self.dmd.Reports['Device Reports']
            rClass = devReports.getReportClass()
	    if not hasattr(devReports, 'HP ProLiant Reports'):
                dc = rClass('HP ProLiant Reports', None)
                devReports._setObject('HP ProLiant Reports', dc)
        ZenPackBase.install(self, app)
开发者ID:alecsandrb,项目名称:Community-Zenpacks,代码行数:8,代码来源:__init__.py

示例15: remove

 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,代码行数:8,代码来源:__init__.py


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