本文整理汇总了Python中Products.ZenModel.ZenPack.ZenPackBase.install方法的典型用法代码示例。如果您正苦于以下问题:Python ZenPackBase.install方法的具体用法?Python ZenPackBase.install怎么用?Python ZenPackBase.install使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products.ZenModel.ZenPack.ZenPackBase
的用法示例。
在下文中一共展示了ZenPackBase.install方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
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'
示例2: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
def install(self, app):
"""Initial installation of the ZenPack """
self._add_events()
ZenPackBase.install(self, app)
self._registerPortlet(app)
示例3: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
def install(self, app):
for devClass, properties in self.dcProperties.iteritems():
self.addDeviceClass(app, devClass, properties)
ZenPackBase.install(self, app)
for d in self.dmd.Devices.getSubDevices():
d.hw.buildRelations()
d.os.buildRelations()
示例4: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
def install(self, app):
if hasattr(self.dmd.zenMenus, "Database"):
self.dmd.zenMenus._delObject("Database")
self.dmd.zenMenus.manage_addZenMenu("Database")
ZenPackBase.install(self, app)
for d in self.dmd.Devices.getSubDevices():
d.os.buildRelations()
示例5: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
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)
示例6: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
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()
示例7: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
def install(self, zport):
"""
Set the collector plugin
"""
ZenPackBase.install(self, zport)
setuphandlers.install(zport, self)
示例8: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
def install(self, app):
ZenPackBase.install(self, app)
super(ZenPack, self).install(app)
log.info("Adding ZenPacks.community.CiscoEnvmonE"
" relationships to existing devices")
self._buildHWRelations()
示例9: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
def install(self, app):
if not hasattr(app.zport.dmd.Events.Status, 'VMware'):
app.zport.dmd.Events.createOrganizer("/Status/VMware")
app.zport.dmd.Reports.createOrganizer('/VMware Reports')
ZenPackBase.install(self, app)
log.info('Linking icon into $ZENHOME/Products/ZenWidgets/skins/zenui/img/icons')
os.system('ln -sf %s %s' % (self.path('resources/img/icons/server-vmware.png'), zenPath('Products/ZenWidgets/skins/zenui/img/icons', 'server-vmware.png')))
os.system('chmod 0644 %s' % (zenPath('Products/ZenWidgets/skins/zenui/img/icons', 'server-vmware.png')))
示例10: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
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)
示例11: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
def install(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.install(self, app)
示例12: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
def install(self, app):
ZenPackBase.install(self, app)
dc = app.dmd.Devices.createOrganizer('/AWS/EC2')
dc.setZenProperty('zCollectorPlugins',
('zenoss.aws.EC2InstanceMap',))
dc.setZenProperty('zPythonClass', 'ZenPacks.zenoss.ZenAWS.EC2Manager')
if dc.devices._getOb('EC2Manager', None): return
ec2m = dc.createInstance('EC2Manager')
ec2m.setPerformanceMonitor('localhost')
示例13: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
def install(self, app):
"""
Create the top-level menu.
"""
if hasattr(self.dmd.zenMenus, 'MessageQueues'):
self.dmd.zenMenus._delObject('MessageQueues')
self.dmd.zenMenus.manage_addZenMenu('MessageQueues')
ZenPackBase.install(self, app)
for d in self.dmd.Devices.getSubDevices():
d.os.buildRelations()
示例14: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
def install(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.install(self, app)
示例15: install
# 需要导入模块: from Products.ZenModel.ZenPack import ZenPackBase [as 别名]
# 或者: from Products.ZenModel.ZenPack.ZenPackBase import install [as 别名]
def install(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.install(self, app)
for d in self.dmd.Devices.getSubDevices():
d.os.buildRelations()