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


Python ZenPackBase.upgrade方法代码示例

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


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

示例1: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
 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,代码行数:9,代码来源:__init__.py

示例2: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
    def upgrade(self, app):
        """ Upgrading the ZenPack procedures """

        self._add_events()

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

示例3: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
 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,代码行数:9,代码来源:__init__.py

示例4: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
    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,代码行数:10,代码来源:__init__.py

示例5: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
 def upgrade(self, app):
     from ZenPacks.community.deviceAdvDetail.thresholds.StatusThreshold import StatusThreshold
     for t in dmd.Devices.getAllRRDTemplates():
         for gt in t.thresholds():
             if isinstance(gt, StatusThreshold): continue
             if gt.id != '%s status'%t.id: continue
             template.thresholds.removeRelation(gt)
     ZenPackBase.upgrade(self, app)
开发者ID:chudler,项目名称:Community-Zenpacks,代码行数:10,代码来源:__init__.py

示例6: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
 def upgrade(self, app):
     if hasattr(self.dmd.Reports, 'Device Reports'):
         devReports = self.dmd.Reports['Device Reports']
         rClass = devReports.getReportClass()
         if not hasattr(devReports, 'SMI-S Reports'):
             dc = rClass('SMI-S Reports', None)
             devReports._setObject('SMI-S Reports', dc)
     for devClass, properties in self.dcProperties.iteritems():
         self.addDeviceClass(app, devClass, properties)
     ZenPackBase.upgrade(self, app)
开发者ID:epuzanov,项目名称:ZenPacks.community.SMISMon,代码行数:12,代码来源:__init__.py

示例7: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
 def upgrade(self, app):
     """
     Delete and re-create the top-level menu.
     """
     if hasattr(self.dmd.zenMenus, 'MessageQueues'):
         self.dmd.zenMenus._delObject('MessageQueues')
     self.dmd.zenMenus.manage_addZenMenu('MessageQueues')
     ZenPackBase.upgrade(self, app)
     for d in self.dmd.Devices.getSubDevices():
         d.os.buildRelations()
开发者ID:alecsandrb,项目名称:Community-Zenpacks,代码行数:12,代码来源:__init__.py

示例8: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
 def upgrade(self, app):
     if hasattr(self.dmd.Reports, 'Device Reports'):
         devReports = self.dmd.Reports['Device Reports']
         rClass = devReports.getReportClass()
         if not hasattr(devReports, 'Snmp Reports'):
             dc = rClass('Snmp Reports', None)
             devReports._setObject('Snmp Reports', dc)
     self.dmd.Events.createOrganizer("/Change/Set/Status")
     ZenPackBase.upgrade(self, app)
     for d in self.dmd.Devices.getSubDevices():
         d.os.buildRelations()
开发者ID:jcurry,项目名称:ZenPacks.skills1st.snmpExtend,代码行数:13,代码来源:__init__.py

示例9: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
    def upgrade(self, app):
	# Device - Storage organizer
        if not hasattr(app.zport.dmd.Devices, 'Storage'):
            manage_addDeviceClass(app.zport.dmd.Devices, 'Storage')
        dc = app.zport.dmd.Devices.getOrganizer('Storage')
        dc.description = ''
	# MIB - Storage organizer
        if not hasattr(app.zport.dmd.Mibs, 'Storage'):
            manage_addDeviceClass(app.zport.dmd.Mibs, 'Storage')
        mg = app.zport.dmd.Mibs.getOrganizer('Storage')
	mg.description = ''

        ZenPackBase.upgrade(self, app)
开发者ID:alecsandrb,项目名称:Community-Zenpacks,代码行数:15,代码来源:__init__.py

示例10: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
 def upgrade(self, app):
     if hasattr(self.dmd.Reports, 'Device Reports'):
         devReports = self.dmd.Reports['Device Reports']
         rClass = devReports.getReportClass()
         if not hasattr(devReports, 'Cisco Reports'):
             dc = rClass('Cisco Reports', None)
             devReports._setObject('Cisco Reports', dc)
     ZenPackBase.upgrade(self, app)
     dc = app.zport.dmd.Devices.getOrganizer('Network/Router/Cisco')
     cpl = list(getattr(dc, 'zCollectorPlugins'))
     for plugin in self.newplugins:
         if not plugin in cpl: cpl.append(plugin)
     dc.zCollectorPlugins = list(cpl)
开发者ID:BillTheBest,项目名称:Community-Zenpacks,代码行数:15,代码来源:__init__.py

示例11: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
    def upgrade(self, app):
        from ZenPacks.community.deviceAdvDetail.thresholds.StatusThreshold import StatusThreshold
        for t in self.dmd.Devices.getAllRRDTemplates():
            for gt in t.thresholds():
                if isinstance(gt, StatusThreshold): continue
                if gt.id != '%s status'%t.id: continue
                template.thresholds.removeRelation(gt)
        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.upgrade(self, app)
开发者ID:alecsandrb,项目名称:Community-Zenpacks,代码行数:16,代码来源:__init__.py

示例12: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
 def upgrade(self, app):
     if not hasattr(app.zport.dmd.Events.Status, 'PyDBAPI'):
         app.zport.dmd.Events.createOrganizer("/Status/PyDBAPI")
     pct = app.zport.dmd.Monitors.rrdTemplates.PerformanceConf
     if hasattr(pct.datasources, 'zenperfsql'):
         pct.manage_deleteRRDDataSources(['zenperfsql'])
     ds = pct.manage_addRRDDataSource('zenperfsql', 'BuiltInDS.Built-In')
     for gdn, dpn, stacked, format in self._gdmap:
         dp = ds.manage_addRRDDataPoint(dpn)
         if dpn in ['dataPoints']:
             dp.rrdtype = 'DERIVE'
             dp.rrdmin = 0
         gd = getattr(pct.graphDefs, gdn, None)
         if not gd: continue
         if hasattr(gd.graphPoints, 'zenperfsql'): continue
         gdp = gd.createGraphPoint(DataPointGraphPoint, 'zenperfsql')
         gdp.dpName = 'zenperfsql_%s'%dpn
         gdp.format = format
         gdp.stacked = stacked
     ZenPackBase.upgrade(self, app)
开发者ID:alienth,项目名称:ZenPacks.community.SQLDataSource,代码行数:22,代码来源:__init__.py

示例13: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
 def upgrade(self, app):
     ZenPackBase.upgrade(self, app)
     self.addProfilerTab(app)
     self.installMenus(app.zport.dmd)
开发者ID:alecsandrb,项目名称:Community-Zenpacks,代码行数:6,代码来源:__init__.py

示例14: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
 def upgrade(self, app):
     ZenPackBase.upgrade(self, app)
开发者ID:bodyakov,项目名称:ZenPacks.TwoNMS.Rancid,代码行数:4,代码来源:__init__.py

示例15: upgrade

# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import upgrade [as 别名]
 def upgrade(self, app):
     ZenPackBase.upgrade(self, app)
     self._buildRelations()
     self._setupCollectorPlugins(app.zport.dmd)
开发者ID:aipai,项目名称:ZenPacks.community.IOStat,代码行数:6,代码来源:__init__.py


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