From d5a1549af2e6d79a60dccb3481f90ca823eb0b2d Mon Sep 17 00:00:00 2001 From: Dave Heller Date: Tue, 13 Sep 2011 10:55:34 -0500 Subject: [PATCH] Zenoss.community.IBMSystemxIMM 0.3.1 --- ZenPacks.community.IBMSystemxIMM/INSTALL.txt | 1 + ZenPacks.community.IBMSystemxIMM/MANIFEST.in | 1 + ZenPacks.community.IBMSystemxIMM/README.txt | 1 + .../ZenPacks/__init__.py | 1 + .../IBMSystemxIMM/IMMComponentLog.py | 123 +++ .../IBMSystemxIMM/IMMComponentVpd.py | 119 +++ .../community/IBMSystemxIMM/IMMCpuVpd.py | 129 +++ .../community/IBMSystemxIMM/IMMDevice.py | 100 +++ .../community/IBMSystemxIMM/IMMFanMon.py | 118 +++ .../community/IBMSystemxIMM/IMMFwVpd.py | 127 +++ .../community/IBMSystemxIMM/IMMMemVpd.py | 124 +++ .../community/IBMSystemxIMM/IMMVoltMon.py | 122 +++ .../community/IBMSystemxIMM/__init__.py | 8 + .../community/IBMSystemxIMM/configure.zcml | 54 ++ .../IBMSystemxIMM/datasources/__init__.py | 2 + .../ZenPacks/community/IBMSystemxIMM/info.py | 105 +++ .../community/IBMSystemxIMM/interfaces.py | 95 ++ .../community/IBMSystemxIMM/lib/__init__.py | 1 + .../IBMSystemxIMM/migrate/__init__.py | 1 + .../IBMSystemxIMM/modeler/__init__.py | 0 .../IBMSystemxIMM/modeler/plugins/__init__.py | 0 .../modeler/plugins/community/__init__.py | 0 .../community/snmp/IBMIMMComponentLogMap.py | 85 ++ .../community/snmp/IBMIMMComponentVpdMap.py | 83 ++ .../plugins/community/snmp/IBMIMMCpuVpdMap.py | 88 ++ .../plugins/community/snmp/IBMIMMDeviceMap.py | 88 ++ .../plugins/community/snmp/IBMIMMFanMonMap.py | 87 ++ .../plugins/community/snmp/IBMIMMFwVpdMap.py | 86 ++ .../plugins/community/snmp/IBMIMMMemVpdMap.py | 86 ++ .../community/snmp/IBMIMMVoltMonMap.py | 92 ++ .../plugins/community/snmp/__init__.py | 0 .../IBMSystemxIMM/objects/objects.xml | 816 ++++++++++++++++++ .../IBMSystemxIMM/resources/IBMSystemxIMM.js | 549 ++++++++++++ .../IMMComponentLogDetail.pt | 70 ++ .../IMMComponentVpdDetail.pt | 66 ++ .../IMMCpuVpdDetail.pt | 76 ++ .../IMMFanMonDetail.pt | 64 ++ .../IMMFwVpdDetail.pt | 70 ++ .../IMMMemVpdDetail.pt | 70 ++ .../IMMVoltMonDetail.pt | 68 ++ .../community/IBMSystemxIMM/tests/__init__.py | 12 + .../ZenPacks/community/__init__.py | 1 + ZenPacks.community.IBMSystemxIMM/setup.py | 69 ++ 43 files changed, 3858 insertions(+) create mode 100644 ZenPacks.community.IBMSystemxIMM/INSTALL.txt create mode 100644 ZenPacks.community.IBMSystemxIMM/MANIFEST.in create mode 100644 ZenPacks.community.IBMSystemxIMM/README.txt create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/__init__.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMComponentLog.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMComponentVpd.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMCpuVpd.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMDevice.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMFanMon.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMFwVpd.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMMemVpd.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMVoltMon.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/__init__.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/configure.zcml create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/datasources/__init__.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/info.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/interfaces.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/lib/__init__.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/migrate/__init__.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/__init__.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/__init__.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/__init__.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMComponentLogMap.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMComponentVpdMap.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMCpuVpdMap.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMDeviceMap.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMFanMonMap.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMFwVpdMap.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMMemVpdMap.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMVoltMonMap.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/__init__.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/objects/objects.xml create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/resources/IBMSystemxIMM.js create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMComponentLogDetail.pt create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMComponentVpdDetail.pt create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMCpuVpdDetail.pt create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMFanMonDetail.pt create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMFwVpdDetail.pt create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMMemVpdDetail.pt create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMVoltMonDetail.pt create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/tests/__init__.py create mode 100644 ZenPacks.community.IBMSystemxIMM/ZenPacks/community/__init__.py create mode 100644 ZenPacks.community.IBMSystemxIMM/setup.py diff --git a/ZenPacks.community.IBMSystemxIMM/INSTALL.txt b/ZenPacks.community.IBMSystemxIMM/INSTALL.txt new file mode 100644 index 0000000..588d262 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/INSTALL.txt @@ -0,0 +1 @@ +Add installation notes here. diff --git a/ZenPacks.community.IBMSystemxIMM/MANIFEST.in b/ZenPacks.community.IBMSystemxIMM/MANIFEST.in new file mode 100644 index 0000000..e91e1bf --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/MANIFEST.in @@ -0,0 +1 @@ +graft ZenPacks diff --git a/ZenPacks.community.IBMSystemxIMM/README.txt b/ZenPacks.community.IBMSystemxIMM/README.txt new file mode 100644 index 0000000..244ffc0 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/README.txt @@ -0,0 +1 @@ +This directory is a template for the creation of new ZenPacks. When a user creates a new ZenPack via the Zenoss gui this directory is copied, modified and installed in $ZENHOME/ZenPacks. \ No newline at end of file diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/__init__.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/__init__.py new file mode 100644 index 0000000..de40ea7 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMComponentLog.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMComponentLog.py new file mode 100644 index 0000000..d6fe43e --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMComponentLog.py @@ -0,0 +1,123 @@ +# ============================================================================== +# IMMDevice object class +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IMMComponentLog is the object class for the IMM Chassis Component activity log""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Globals import DTMLFile +from Globals import InitializeClass + +from Products.ZenRelations.RelSchema import * +from Products.ZenModel.ZenossSecurity import ZEN_VIEW, ZEN_CHANGE_SETTINGS + +from Products.ZenModel.DeviceComponent import DeviceComponent +from Products.ZenModel.ManagedEntity import ManagedEntity + +import logging +log = logging.getLogger('IMMComponentLog') + +class IMMComponentLog(DeviceComponent, ManagedEntity): + """IMM VPD object""" + + # When Javascript bits are used, this name must match the value of the 1st field in ZC.registerName() in the *.js + portal_type = meta_type = 'IMMComponentLog' + + # Data retrieved from modeling + componentLevelVpdTrackingIndex = '0' + componentLevelVpdTrackingFruNumber = '' + componentLevelVpdTrackingFruName = '' + componentLevelVpdTrackingSerialNumber = '' + componentLevelVpdTrackingManufacturingId = '' + componentLevelVpdTrackingAction = '' + componentLevelVpdTrackingTimestamp = '' + + _properties = ( + {'id':'componentLevelVpdTrackingIndex', 'type':'int', 'mode':''}, + {'id':'componentLevelVpdTrackingFruNumber', 'type':'string', 'mode':''}, + {'id':'componentLevelVpdTrackingFruName', 'type':'string', 'mode':''}, + {'id':'componentLevelVpdTrackingSerialNumber', 'type':'string', 'mode':''}, + {'id':'componentLevelVpdTrackingManufacturingId', 'type':'string', 'mode':''}, + {'id':'componentLevelVpdTrackingAction', 'type':'string', 'mode':''}, + {'id':'componentLevelVpdTrackingTimestamp', 'type':'string', 'mode':''} + ) + + _relations = ( + ("IMMDev", ToOne(ToManyCont, + "ZenPacks.community.IBMSystemxIMM.IMMDevice", "IMMCOMPVPD")), + ) + + factory_type_information = ( + { + 'id' : 'IMMComponentLog', + 'meta_type' : 'IMMComponentLog', + 'product' : 'IBMSystemxIMM', + 'immediate_view' : 'viewDevicePerformance', + 'actions' : + ( + { 'id' : 'viewHistory' + , 'name' : 'Modifications' + , 'action' : 'viewHistory' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'perfConf' + , 'name' : 'Monitoring Templates' + , 'action' : 'objTemplates' + , 'permissions' : (ZEN_CHANGE_SETTINGS, ) + }, + ) + }, + ) + + isUserCreatedFlag = True + + def isUserCreated(self): + """ + Returns the value of isUserCreated. True adds SAVE & CANCEL buttons to Details menu + """ + return self.isUserCreatedFlag + + def viewName(self): + """ The component name as it will appear in the UI """ + if self.componentLevelVpdTrackingFruName.__len__() == 0: + return "Unknown" + else: + return str( self.componentLevelVpdTrackingIndex ) + " - " + self.componentLevelVpdTrackingFruName + + # use viewName as titleOrId because that method is used to display a human + # readable version of the object in the breadcrumbs + titleOrId = name = viewName + + def primarySortKey(self): + """Sort by VPD index number then VPD type""" + return "%s%s" % (self.componentLevelVpdTrackingIndex, self.componentLevelVpdTrackingFruName) + + def device(self): + return self.IMMDev() + + def monitored(self): + return True + +InitializeClass(IMMComponentLog) diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMComponentVpd.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMComponentVpd.py new file mode 100644 index 0000000..7e5bcbf --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMComponentVpd.py @@ -0,0 +1,119 @@ +# ============================================================================== +# IMMComponentVpd object class +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IMMComponentVpd is the object class for the IMM Chassis Component VPD""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Globals import DTMLFile +from Globals import InitializeClass + +from Products.ZenRelations.RelSchema import * +from Products.ZenModel.ZenossSecurity import ZEN_VIEW, ZEN_CHANGE_SETTINGS + +from Products.ZenModel.DeviceComponent import DeviceComponent +from Products.ZenModel.ManagedEntity import ManagedEntity + +import logging +log = logging.getLogger('IMMComponentVpd') + +class IMMComponentVpd(DeviceComponent, ManagedEntity): + """IMM VPD object""" + + # When Javascript bits are used, this name must match the value of the 1st field in ZC.registerName() in the *.js + portal_type = meta_type = 'IMMComponentVpd' + + # Data retrieved from modeling + componentLevelVpdIndex = '0' + componentLevelVpdFruNumber = '' + componentLevelVpdFruName = '' + componentLevelVpdSerialNumber = '' + componentLevelVpdManufacturingId = '' + + _properties = ( + {'id':'componentLevelVpdIndex', 'type':'int', 'mode':''}, + {'id':'componentLevelVpdFruNumber', 'type':'string', 'mode':''}, + {'id':'componentLevelVpdFruName', 'type':'string', 'mode':''}, + {'id':'componentLevelVpdSerialNumber', 'type':'string', 'mode':''}, + {'id':'componentLevelVpdManufacturingId', 'type':'string', 'mode':''}, + ) + + _relations = ( + ("IMMDev", ToOne(ToManyCont, + "ZenPacks.community.IBMSystemxIMM.IMMDevice", "IMMCOMPVPD")), + ) + + factory_type_information = ( + { + 'id' : 'IMMComponentVpd', + 'meta_type' : 'IMMComponentVpd', + 'product' : 'IBMSystemxIMM', + 'immediate_view' : 'viewDevicePerformance', + 'actions' : + ( + { 'id' : 'viewHistory' + , 'name' : 'Modifications' + , 'action' : 'viewHistory' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'perfConf' + , 'name' : 'Monitoring Templates' + , 'action' : 'objTemplates' + , 'permissions' : (ZEN_CHANGE_SETTINGS, ) + }, + ) + }, + ) + + isUserCreatedFlag = True + + def isUserCreated(self): + """ + Returns the value of isUserCreated. True adds SAVE & CANCEL buttons to Details menu + """ + return self.isUserCreatedFlag + + def viewName(self): + """ The component name as it will appear in the UI """ + if self.componentLevelVpdFruName.__len__() == 0: + return "Unknown" + else: + return str( self.componentLevelVpdIndex ) + " - " + self.componentLevelVpdFruName + + # use viewName as titleOrId because that method is used to display a human + # readable version of the object in the breadcrumbs + titleOrId = name = viewName + + def primarySortKey(self): + """Sort by VPD index number then VPD type""" + return "%s%s" % (self.componentLevelVpdIndex, self.componentLevelVpdFruName) + + def device(self): + return self.IMMDev() + + def monitored(self): + return True + +InitializeClass(IMMComponentVpd) diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMCpuVpd.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMCpuVpd.py new file mode 100644 index 0000000..277a4b4 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMCpuVpd.py @@ -0,0 +1,129 @@ +# ============================================================================== +# IMMCpuVpd object class +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IMMCpuVpd is the object class for the IMM System CPU VPD""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Globals import DTMLFile +from Globals import InitializeClass + +from Products.ZenRelations.RelSchema import * +from Products.ZenModel.ZenossSecurity import ZEN_VIEW, ZEN_CHANGE_SETTINGS + +from Products.ZenModel.DeviceComponent import DeviceComponent +from Products.ZenModel.ManagedEntity import ManagedEntity + +import logging +log = logging.getLogger('IMMCpuVpd') + +class IMMCpuVpd(DeviceComponent, ManagedEntity): + """IMM VPD object""" + + # When Javascript bits are used, this name must match the value of the 1st field in ZC.registerName() in the *.js + portal_type = meta_type = 'IMMCpuVpd' + + # Data retrieved from modeling + cpuVpdIndex = '0' + cpuVpdDescription = '' + cpuVpdSpeed = '' + cpuVpdIdentifier = '' + cpuVpdType = '' + cpuVpdFamily = '' + cpuVpdCores = '' + cpuVpdThreads = '' + cpuVpdVoltage = '' + cpuVpdDataWidth = '' + + _properties = ( + {'id':'cpuVpdIndex', 'type':'int', 'mode':''}, + {'id':'cpuVpdDescription', 'type':'string', 'mode':''}, + {'id':'cpuVpdSpeed', 'type':'string', 'mode':''}, + {'id':'cpuVpdIdentifier', 'type':'string', 'mode':''}, + {'id':'cpuVpdType', 'type':'string', 'mode':''}, + {'id':'cpuVpdFamily', 'type':'string', 'mode':''}, + {'id':'cpuVpdCores', 'type':'string', 'mode':''}, + {'id':'cpuVpdThreads', 'type':'string', 'mode':''}, + {'id':'cpuVpdVoltage', 'type':'string', 'mode':''}, + {'id':'cpuVpdDataWidth', 'type':'string', 'mode':''}, + ) + + _relations = ( + ("IMMDev", ToOne(ToManyCont, + "ZenPacks.community.IBMSystemxIMM.IMMDevice", "IMMCPUVPD")), + ) + + factory_type_information = ( + { + 'id' : 'IMMCpuVpd', + 'meta_type' : 'IMMCpuVpd', + 'product' : 'IBMSystemxIMM', + 'immediate_view' : 'viewDevicePerformance', + 'actions' : + ( + { 'id' : 'viewHistory' + , 'name' : 'Modifications' + , 'action' : 'viewHistory' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'perfConf' + , 'name' : 'Monitoring Templates' + , 'action' : 'objTemplates' + , 'permissions' : (ZEN_CHANGE_SETTINGS, ) + }, + ) + }, + ) + + isUserCreatedFlag = True + + def isUserCreated(self): + """ + Returns the value of isUserCreated. True adds SAVE & CANCEL buttons to Details menu + """ + return self.isUserCreatedFlag + + def viewName(self): + """ The component name as it will appear in the UI """ + if self.cpuVpdDescription.__len__() == 0: + return "Unknown" + else: + return str( self.cpuVpdIndex ) + " - " + self.cpuVpdDescription + + # use viewName as titleOrId because that method is used to display a human + # readable version of the object in the breadcrumbs + titleOrId = name = viewName + + def primarySortKey(self): + """Sort by VPD index number then VPD type""" + return "%s%s" % (self.cpuVpdIndex, self.cpuVpdDescription) + + def device(self): + return self.IMMDev() + + def monitored(self): + return True + +InitializeClass(IMMCpuVpd) diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMDevice.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMDevice.py new file mode 100644 index 0000000..90ef464 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMDevice.py @@ -0,0 +1,100 @@ +# ============================================================================== +# IMMDevice object class +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IMMDevice is the object class for the IMM at the device level""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Globals import InitializeClass +from Products.ZenRelations.RelSchema import * +from Products.ZenModel.Device import Device +from Products.ZenModel.ZenossSecurity import ZEN_VIEW +from copy import deepcopy + +class IMMDevice(Device): + "IBM Integrated Management Module" + + _relations = Device._relations + ( + ('IMMFWVPD', ToManyCont(ToOne, + 'ZenPacks.community.IBMSystemxIMM.IMMFwVpd', 'IMMDev')), + ('IMMCPUVPD', ToManyCont(ToOne, + 'ZenPacks.community.IBMSystemxIMM.IMMCpuVpd', 'IMMDev')), + ('IMMMEMVPD', ToManyCont(ToOne, + 'ZenPacks.community.IBMSystemxIMM.IMMMemVpd', 'IMMDev')), + ('IMMCOMPVPD', ToManyCont(ToOne, + 'ZenPacks.community.IBMSystemxIMM.IMMComponentVpd', 'IMMDev')), + ('IMMCOMPLOG', ToManyCont(ToOne, + 'ZenPacks.community.IBMSystemxIMM.IMMComponentLog', 'IMMDev')), + ('IMMFANMON', ToManyCont(ToOne, + 'ZenPacks.community.IBMSystemxIMM.IMMFanMon', 'IMMDev')), + ('IMMVOLTMON', ToManyCont(ToOne, + 'ZenPacks.community.IBMSystemxIMM.IMMVoltMon', 'IMMDev')), + ) + + # Previously these were tabs but in 3.0 the appear as separate menu item in the device view + factory_type_information = deepcopy(Device.factory_type_information) + factory_type_information[0]['actions'] += ( + { 'id' : 'IMMFWVPD' + , 'name' : 'IMM Firmware VPD' + , 'action' : 'IMMFwVpdDetail' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'IMMCPUPD' + , 'name' : 'IMM CPU VPD' + , 'action' : 'IMMCpuVpdDetail' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'IMMMEMVPD' + , 'name' : 'IMM Memory VPD' + , 'action' : 'IMMMemVpdDetail' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'IMMCOMPVPD' + , 'name' : 'IMM Chassis Component VPD' + , 'action' : 'IMMComponentVpdDetail' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'IMMCOMPLOG' + , 'name' : 'IMM Chassis Component Log' + , 'action' : 'IMMComponentLogDetail' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'IMMFANMON' + , 'name' : 'IMM Fan Monitor' + , 'action' : 'IMMFanMonDetail' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'IMMVOLTMON' + , 'name' : 'IMM Voltage Monitor' + , 'action' : 'IMMVoltMonDetail' + , 'permissions' : (ZEN_VIEW, ) + }, + ) + + def __init__(self, *args, **kw): + Device.__init__(self, *args, **kw) + self.buildRelations() + +InitializeClass(IMMDevice) diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMFanMon.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMFanMon.py new file mode 100644 index 0000000..c11fd91 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMFanMon.py @@ -0,0 +1,118 @@ +# ============================================================================== +# IMMFanMon object class +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IMMFanMon is the object class for the IMM System Fan monitors""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Globals import DTMLFile +from Globals import InitializeClass + +from Products.ZenRelations.RelSchema import * +from Products.ZenModel.ZenossSecurity import ZEN_VIEW, ZEN_CHANGE_SETTINGS + +from Products.ZenModel.DeviceComponent import DeviceComponent +from Products.ZenModel.ManagedEntity import ManagedEntity + +import logging +log = logging.getLogger('IMMFanMon') + +class IMMFanMon(DeviceComponent, ManagedEntity): + """IMM VPD object""" + + # When Javascript bits are used, this name must match the value of the 1st field in ZC.registerName() in the *.js + portal_type = meta_type = 'IMMFanMon' + + # Data retrieved from modeling + fanIndex = '0' + fanDescr = '' + fanSpeed = '' + fanCritLimitLow = '' + + _properties = ( + {'id':'fanIndex', 'type':'int', 'mode':''}, + {'id':'fanDescr', 'type':'string', 'mode':''}, + {'id':'fanSpeed', 'type':'string', 'mode':''}, + {'id':'fanCritLimitLow', 'type':'string', 'mode':''} + ) + + _relations = ( + ("IMMDev", ToOne(ToManyCont, + "ZenPacks.community.IBMSystemxIMM.IMMDevice", "IMMFANMON")), + ) + + factory_type_information = ( + { + 'id' : 'IMMFanMon', + 'meta_type' : 'IMMFanMon', + 'product' : 'IBMSystemxIMM', + 'immediate_view' : 'viewDevicePerformance', + 'actions' : + ( + { 'id' : 'viewHistory' + , 'name' : 'Modifications' + , 'action' : 'viewHistory' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'perfConf' + , 'name' : 'Monitoring Templates' + , 'action' : 'objTemplates' + , 'permissions' : (ZEN_CHANGE_SETTINGS, ) + }, + ) + }, + ) + + isUserCreatedFlag = True + + def isUserCreated(self): + """ + Returns the value of isUserCreated. True adds SAVE & CANCEL buttons to Details menu + """ + return self.isUserCreatedFlag + + def viewName(self): + """ The component name as it will appear in the UI """ + if self.fanDescr.__len__() == 0: + return "Unknown" + else: +# return str( self.fanIndex ) + " - " + self.fanDescr + return self.fanDescr + + # use viewName as titleOrId because that method is used to display a human + # readable version of the object in the breadcrumbs + titleOrId = name = viewName + + def primarySortKey(self): + """ Sort by description is good here """ + return "%s" % (self.fanDescr) + + def device(self): + return self.IMMDev() + + def monitored(self): + return True + +InitializeClass(IMMFanMon) diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMFwVpd.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMFwVpd.py new file mode 100644 index 0000000..11e571a --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMFwVpd.py @@ -0,0 +1,127 @@ +# ============================================================================== +# IMMFwVpd object class +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IMMFwVpd is the object class for the IMM System firmware VPD""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Globals import DTMLFile +from Globals import InitializeClass + +from Products.ZenRelations.RelSchema import * +from Products.ZenModel.ZenossSecurity import ZEN_VIEW, ZEN_CHANGE_SETTINGS + +from Products.ZenModel.DeviceComponent import DeviceComponent +from Products.ZenModel.ManagedEntity import ManagedEntity + +import logging +log = logging.getLogger('IMMFwVpd') + +class IMMFwVpd(DeviceComponent, ManagedEntity): + """IMM VPD object""" + + # When 3.0 style Javascript is not used, this is the name that will appear in the UI under Components heading. + # When Javascript bits are used, this name must match the value of the 1st field in ZC.registerName() in the *.js; + # the name that appears in the UI is then determined be the remaining fields of ZC.registerName(). +# event_key = portal_type = meta_type = 'IMM Firmware VPD' + portal_type = meta_type = 'IMMFwVpd' + + # Data retrieved from modeling + immVpdIndex = '0' + immVpdType = 'VPD' + immVpdVersionString = 'ABCDEFG' + immVpdReleaseDate = '01/01/2000' + + _properties = ( + {'id':'immVpdIndex', 'type':'int', 'mode':''}, + {'id':'immVpdType', 'type':'string', 'mode':''}, + {'id':'immVpdVersionString', 'type':'string', 'mode':''}, + {'id':'immVpdReleaseDate', 'type':'string', 'mode':''} + ) + + _relations = ( + ("IMMDev", ToOne(ToManyCont, + "ZenPacks.community.IBMSystemxIMM.IMMDevice", "IMMFWVPD")), + ) + + factory_type_information = ( + { + 'id' : 'IMMFwVpd', + 'meta_type' : 'IMMFwVpd', +# 'description' : """VPD entry info""", + 'product' : 'IBMSystemxIMM', + 'immediate_view' : 'IMMFwVpd', + 'actions' : + ( +# { 'id' : 'status' +# , 'name' : 'Another Graphs tab' +# , 'action' : 'viewDevicePerformance' +# , 'permissions' : (ZEN_VIEW, ) +# }, + { 'id' : 'viewHistory' + , 'name' : 'Modifications' + , 'action' : 'viewHistory' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'perfConf' + , 'name' : 'Monitoring Templates' + , 'action' : 'objTemplates' + , 'permissions' : (ZEN_CHANGE_SETTINGS, ) + }, + ) + }, + ) + + isUserCreatedFlag = True + + def isUserCreated(self): + """ + Returns the value of isUserCreated. True adds SAVE & CANCEL buttons to Details menu + """ + return self.isUserCreatedFlag + + def viewName(self): + """ The component name as it will appear in the UI... assuming you display the attribute 'name'... """ + if self.immVpdType.__len__() == 0: + return "Unknown" + else: + return str( self.immVpdIndex ) + " - " + self.immVpdType + + # use viewName as titleOrId because that method is used to display a human + # readable version of the object in the breadcrumbs + titleOrId = name = viewName + + def primarySortKey(self): + """Sort by VPD index number then VPD type""" + return "%s%s" % (self.immVpdIndex, self.immVpdType) + + ## -- I think the idea here is, this method returns the containing device via the relation defined above... + def device(self): + return self.IMMDev() + + def monitored(self): + return True + +InitializeClass(IMMFwVpd) diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMMemVpd.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMMemVpd.py new file mode 100644 index 0000000..e0959ff --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMMemVpd.py @@ -0,0 +1,124 @@ +# ============================================================================== +# IMMMemVpd object class +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IMMMemVpd is the object class for the IMM System memory VPD""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Globals import DTMLFile +from Globals import InitializeClass + +from Products.ZenRelations.RelSchema import * +from Products.ZenModel.ZenossSecurity import ZEN_VIEW, ZEN_CHANGE_SETTINGS + +from Products.ZenModel.DeviceComponent import DeviceComponent +from Products.ZenModel.ManagedEntity import ManagedEntity + +import logging +log = logging.getLogger('IMMMemVpd') + +class IMMMemVpd(DeviceComponent, ManagedEntity): + """IMM VPD object""" + + # When Javascript bits are used, this name must match the value of the 1st field in ZC.registerName() in the *.js + portal_type = meta_type = 'IMMMemVpd' + + # Data retrieved from modeling + memoryVpdIndex = '0' + memoryVpdDescription = '' + memoryVpdPartNumber = '' + memoryVpdFRUSerialNumber = '' + memoryVpdManufactureDate = '' + memoryVpdType = '' + memoryVpdSize = '' + + _properties = ( + {'id':'memoryVpdIndex', 'type':'int', 'mode':''}, + {'id':'memoryVpdDescription', 'type':'string', 'mode':''}, + {'id':'memoryVpdPartNumber', 'type':'string', 'mode':''}, + {'id':'memoryVpdFRUSerialNumber', 'type':'string', 'mode':''}, + {'id':'memoryVpdManufactureDate', 'type':'string', 'mode':''}, + {'id':'memoryVpdType', 'type':'string', 'mode':''}, + {'id':'memoryVpdSize', 'type':'string', 'mode':''} + ) + + _relations = ( + ("IMMDev", ToOne(ToManyCont, + "ZenPacks.community.IBMSystemxIMM.IMMDevice", "IMMMEMVPD")), + ) + + factory_type_information = ( + { + 'id' : 'IMMMemVpd', + 'meta_type' : 'IMMMemVpd', + 'product' : 'IBMSystemxIMM', + 'immediate_view' : 'viewDevicePerformance', + 'actions' : + ( + { 'id' : 'viewHistory' + , 'name' : 'Modifications' + , 'action' : 'viewHistory' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'perfConf' + , 'name' : 'Monitoring Templates' + , 'action' : 'objTemplates' + , 'permissions' : (ZEN_CHANGE_SETTINGS, ) + }, + ) + }, + ) + + isUserCreatedFlag = True + + def isUserCreated(self): + """ + Returns the value of isUserCreated. True adds SAVE & CANCEL buttons to Details menu + """ + return self.isUserCreatedFlag + + def viewName(self): + """ The component name as it will appear in the UI """ + if self.memoryVpdDescription.__len__() == 0: + return "Unknown" + else: + return str( self.memoryVpdIndex ) + " - " + self.memoryVpdDescription + + # use viewName as titleOrId because that method is used to display a human + # readable version of the object in the breadcrumbs + titleOrId = name = viewName + + def primarySortKey(self): + """Sort by VPD index number then VPD type""" + return "%s%s" % (self.memoryVpdIndex, self.memoryVpdDescription) + + ## -- I think the idea here is, this method returns the containing device via the relation defined above... + def device(self): + return self.IMMDev() + + def monitored(self): + return True + +InitializeClass(IMMMemVpd) diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMVoltMon.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMVoltMon.py new file mode 100644 index 0000000..b3b4846 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/IMMVoltMon.py @@ -0,0 +1,122 @@ +# ============================================================================== +# IMMVoltMon object class +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IMMVoltMon is the object class for the IMM System Voltage monitors""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Globals import DTMLFile +from Globals import InitializeClass + +from Products.ZenRelations.RelSchema import * +from Products.ZenModel.ZenossSecurity import ZEN_VIEW, ZEN_CHANGE_SETTINGS + +from Products.ZenModel.DeviceComponent import DeviceComponent +from Products.ZenModel.ManagedEntity import ManagedEntity + +import logging +log = logging.getLogger('IMMVoltMon') + +class IMMVoltMon(DeviceComponent, ManagedEntity): + """IMM VPD object""" + + # When Javascript bits are used, this name must match the value of the 1st field in ZC.registerName() in the *.js + portal_type = meta_type = 'IMMVoltMon' + + # Data retrieved from modeling + voltIndex = '0' + voltDescr = '' + voltReading = '' + voltNominalReading = '' + voltCritLimitHigh = '' + voltCritLimitLow = '' + + _properties = ( + {'id':'voltIndex', 'type':'int', 'mode':''}, + {'id':'voltDescr', 'type':'string', 'mode':''}, + {'id':'voltReading', 'type':'string', 'mode':''}, + {'id':'voltNominalReading', 'type':'string', 'mode':''}, + {'id':'voltCritLimitHigh', 'type':'string', 'mode':''}, + {'id':'voltCritLimitLow', 'type':'string', 'mode':''} + ) + + _relations = ( + ("IMMDev", ToOne(ToManyCont, + "ZenPacks.community.IBMSystemxIMM.IMMDevice", "IMMVOLTMON")), + ) + + factory_type_information = ( + { + 'id' : 'IMMVoltMon', + 'meta_type' : 'IMMVoltMon', + 'product' : 'IBMSystemxIMM', + 'immediate_view' : 'viewDevicePerformance', + 'actions' : + ( + { 'id' : 'viewHistory' + , 'name' : 'Modifications' + , 'action' : 'viewHistory' + , 'permissions' : (ZEN_VIEW, ) + }, + { 'id' : 'perfConf' + , 'name' : 'Monitoring Templates' + , 'action' : 'objTemplates' + , 'permissions' : (ZEN_CHANGE_SETTINGS, ) + }, + ) + }, + ) + + isUserCreatedFlag = True + + def isUserCreated(self): + """ + Returns the value of isUserCreated. True adds SAVE & CANCEL buttons to Details menu + """ + return self.isUserCreatedFlag + + def viewName(self): + """ The component name as it will appear in the UI """ + if self.voltDescr.__len__() == 0: + return "Unknown" + else: + return str( self.voltIndex ) + " - " + self.voltDescr +# return self.voltDescr + + # use viewName as titleOrId because that method is used to display a human + # readable version of the object in the breadcrumbs + titleOrId = name = viewName + + def primarySortKey(self): + """ Sort by index is good here """ + return "%s" % (self.voltIndex) + + def device(self): + return self.IMMDev() + + def monitored(self): + return True + +InitializeClass(IMMVoltMon) diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/__init__.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/__init__.py new file mode 100644 index 0000000..09daab2 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/__init__.py @@ -0,0 +1,8 @@ + +import Globals +import os.path + +skinsDir = os.path.join(os.path.dirname(__file__), 'skins') +from Products.CMFCore.DirectoryView import registerDirectory +if os.path.isdir(skinsDir): + registerDirectory(skinsDir, globals()) diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/configure.zcml b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/configure.zcml new file mode 100644 index 0000000..ad3e800 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/configure.zcml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/datasources/__init__.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/datasources/__init__.py new file mode 100644 index 0000000..651585a --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/datasources/__init__.py @@ -0,0 +1,2 @@ +# __init__.py + diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/info.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/info.py new file mode 100644 index 0000000..9a06a70 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/info.py @@ -0,0 +1,105 @@ +# ============================================================================== +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""Representation of IMM VPD and Monitoring components""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from zope.interface import implements +from Products.Zuul.infos import ProxyProperty +from Products.Zuul.infos.component import ComponentInfo +from Products.Zuul.decorators import info +#from Products.ZenUtils.Utils import convToUnits +from ZenPacks.community.IBMSystemxIMM import interfaces + +class IMMFwVpdInfo(ComponentInfo): + implements(interfaces.IIMMFwVpdInfo) + + immVpdIndex = ProxyProperty("immVpdIndex") + immVpdType = ProxyProperty("immVpdType") + immVpdVersionString = ProxyProperty("immVpdVersionString") + immVpdReleaseDate = ProxyProperty("immVpdReleaseDate") + comment = ProxyProperty("comment") + +class IMMCpuVpdInfo(ComponentInfo): + implements(interfaces.IIMMCpuVpdInfo) + + cpuVpdIndex = ProxyProperty("cpuVpdIndex") + cpuVpdDescription = ProxyProperty("cpuVpdDescription") + cpuVpdSpeed = ProxyProperty("cpuVpdSpeed") + cpuVpdIdentifier = ProxyProperty("cpuVpdIdentifier") + cpuVpdType = ProxyProperty("cpuVpdType") + cpuVpdFamily = ProxyProperty("cpuVpdFamily") + cpuVpdCores = ProxyProperty("cpuVpdCores") + cpuVpdThreads = ProxyProperty("cpuVpdThreads") + cpuVpdVoltage = ProxyProperty("cpuVpdVoltage") + cpuVpdDataWidth = ProxyProperty("cpuVpdDataWidth") + +class IMMMemVpdInfo(ComponentInfo): + implements(interfaces.IIMMMemVpdInfo) + + memoryVpdIndex = ProxyProperty("memoryVpdIndex") + memoryVpdDescription = ProxyProperty("memoryVpdDescription") + memoryVpdPartNumber = ProxyProperty("memoryVpdPartNumber") + memoryVpdFRUSerialNumber = ProxyProperty("memoryVpdFRUSerialNumber") + memoryVpdManufactureDate = ProxyProperty("memoryVpdManufactureDate") + memoryVpdType = ProxyProperty("memoryVpdType") + memoryVpdSize = ProxyProperty("memoryVpdSize") + +class IMMComponentVpdInfo(ComponentInfo): + implements(interfaces.IIMMComponentVpdInfo) + + componentLevelVpdIndex = ProxyProperty("componentLevelVpdIndex") + componentLevelVpdFruNumber = ProxyProperty("componentLevelVpdFruNumber") + componentLevelVpdFruName = ProxyProperty("componentLevelVpdFruName") + componentLevelVpdSerialNumber = ProxyProperty("componentLevelVpdSerialNumber") + componentLevelVpdManufacturingId = ProxyProperty("componentLevelVpdManufacturingId") + +class IMMComponentLogInfo(ComponentInfo): + implements(interfaces.IIMMComponentLogInfo) + + componentLevelVpdTrackingIndex = ProxyProperty("componentLevelVpdTrackingIndex") + componentLevelVpdTrackingFruNumber = ProxyProperty("componentLevelVpdTrackingFruNumber") + componentLevelVpdTrackingFruName = ProxyProperty("componentLevelVpdTrackingFruName") + componentLevelVpdTrackingSerialNumber = ProxyProperty("componentLevelVpdTrackingSerialNumber") + componentLevelVpdTrackingManufacturingId = ProxyProperty("componentLevelVpdTrackingManufacturingId") + componentLevelVpdTrackingAction = ProxyProperty("componentLevelVpdTrackingAction") + componentLevelVpdTrackingTimestamp = ProxyProperty("componentLevelVpdTrackingTimestamp") + +class IMMFanMonInfo(ComponentInfo): + implements(interfaces.IIMMFanMonInfo) + + fanIndex = ProxyProperty("fanIndex") + fanDescr = ProxyProperty("fanDescr") + fanSpeed = ProxyProperty("fanSpeed") + fanCritLimitLow = ProxyProperty("fanCritLimitLow") + +class IMMVoltMonInfo(ComponentInfo): + implements(interfaces.IIMMVoltMonInfo) + + voltIndex = ProxyProperty("voltIndex") + voltDescr = ProxyProperty("voltDescr") + voltReading = ProxyProperty("voltReading") + voltNominalReading = ProxyProperty("voltNominalReading") + voltCritLimitHigh = ProxyProperty("voltCritLimitHigh") + voltCritLimitLow = ProxyProperty("voltCritLimitLow") diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/interfaces.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/interfaces.py new file mode 100644 index 0000000..939245d --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/interfaces.py @@ -0,0 +1,95 @@ +# ============================================================================== +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""interfaces describes the form field to the user interface""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Products.Zuul.interfaces import IComponentInfo +from Products.Zuul.form import schema +from Products.Zuul.utils import ZuulMessageFactory as _t + +class IIMMFwVpdInfo(IComponentInfo): + + immVpdIndex = schema.Text(title=u"ID", readonly=True, group='Details') + immVpdType = schema.Text(title=u"Firmware VPD Type", readonly=True, group='Details') + immVpdVersionString = schema.Text(title=u"Version", readonly=True,group='Details') + immVpdReleaseDate = schema.Text(title=u"Release Date", readonly=True, group='Details') + comment = schema.Text(title=u"Comment", group='Details') + +class IIMMCpuVpdInfo(IComponentInfo): + + cpuVpdIndex = schema.Text(title=u"ID", readonly=True, group='Details') + cpuVpdDescription = schema.Text(title=u"Description", readonly=True, group='Details') + cpuVpdSpeed = schema.Text(title=u"Speed (MHz)", readonly=True,group='Details') + cpuVpdIdentifier = schema.Text(title=u"Identifier", readonly=True,group='Details') + cpuVpdType = schema.Text(title=u"Type", readonly=True,group='Details') + cpuVpdFamily = schema.Text(title=u"Family", readonly=True,group='Details') + cpuVpdCores = schema.Text(title=u"Cores", readonly=True,group='Details') + cpuVpdThreads = schema.Text(title=u"Threads", readonly=True, group='Details') + cpuVpdVoltage = schema.Text(title=u"Voltage", readonly=True, group='Details') + cpuVpdDataWidth = schema.Text(title=u"Data Width", readonly=True, group='Details') + +class IIMMMemVpdInfo(IComponentInfo): + + memoryVpdIndex = schema.Text(title=u"ID", readonly=True, group='Details') + memoryVpdDescription = schema.Text(title=u"Description", readonly=True, group='Details') + memoryVpdPartNumber = schema.Text(title=u"Part Number", readonly=True,group='Details') + memoryVpdFRUSerialNumber = schema.Text(title=u"Serial Number", readonly=True,group='Details') + memoryVpdManufactureDate = schema.Text(title=u"Manufacture date", readonly=True,group='Details') + memoryVpdType = schema.Text(title=u"Memory type", readonly=True,group='Details') + memoryVpdSize = schema.Text(title=u"Size (GB)", readonly=True,group='Details') + +class IIMMComponentVpdInfo(IComponentInfo): + + componentLevelVpdIndex = schema.Text(title=u"ID", readonly=True, group='Details') + componentLevelVpdFruNumber = schema.Text(title=u"FRU Number", readonly=True, group='Details') + componentLevelVpdFruName = schema.Text(title=u"FRU Name", readonly=True,group='Details') + componentLevelVpdSerialNumber = schema.Text(title=u"Serial Number", readonly=True,group='Details') + componentLevelVpdManufacturingId = schema.Text(title=u"Manufacturer", readonly=True,group='Details') + +class IIMMComponentLogInfo(IComponentInfo): + + componentLevelVpdTrackingIndex = schema.Text(title=u"ID", readonly=True, group='Details') + componentLevelVpdTrackingFruNumber = schema.Text(title=u"FRU Number", readonly=True, group='Details') + componentLevelVpdTrackingFruName = schema.Text(title=u"FRU Name", readonly=True,group='Details') + componentLevelVpdTrackingSerialNumber = schema.Text(title=u"Serial Number", readonly=True,group='Details') + componentLevelVpdTrackingManufacturingId = schema.Text(title=u"Manufacturer", readonly=True,group='Details') + componentLevelVpdTrackingAction = schema.Text(title=u"Action", readonly=True,group='Details') + componentLevelVpdTrackingTimestamp = schema.Text(title=u"Timestamp", readonly=True,group='Details') + +class IIMMFanMonInfo(IComponentInfo): + + fanIndex = schema.Text(title=u"ID", readonly=True, group='Details') + fanDescr = schema.Text(title=u"Fan Description", readonly=True, group='Details') + fanSpeed = schema.Text(title=u"Fan Speed", readonly=True,group='Details') + fanCritLimitLow = schema.Text(title=u"Critical Low Limit", readonly=True,group='Details') + +class IIMMVoltMonInfo(IComponentInfo): + + voltIndex = schema.Text(title=u"ID", readonly=True, group='Details') + voltDescr = schema.Text(title=u"Description", readonly=True, group='Details') + voltReading = schema.Text(title=u"Current Reading", readonly=True,group='Details') + voltNominalReading = schema.Text(title=u"Nominal Reading", readonly=True,group='Details') + voltCritLimitHigh = schema.Text(title=u"Critical High Limit", readonly=True,group='Details') + voltCritLimitLow = schema.Text(title=u"Critical Low Limit", readonly=True,group='Details') diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/lib/__init__.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/lib/__init__.py new file mode 100644 index 0000000..143f486 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/lib/__init__.py @@ -0,0 +1 @@ +# __init__.py diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/migrate/__init__.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/migrate/__init__.py new file mode 100644 index 0000000..143f486 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/migrate/__init__.py @@ -0,0 +1 @@ +# __init__.py diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/__init__.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/__init__.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/__init__.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMComponentLogMap.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMComponentLogMap.py new file mode 100644 index 0000000..886d76b --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMComponentLogMap.py @@ -0,0 +1,85 @@ +# ============================================================================== +# IBMIMMComponentLogMap modeler plugin +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IBMIMMComponentLogMap maps chassis component VPD entries associated with an IMM""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin, GetTableMap, GetMap +from Products.DataCollector.plugins.DataMaps import ObjectMap + +class IBMIMMComponentLogMap(SnmpPlugin): + + relname = "IMMCOMPLOG" + modname = "ZenPacks.community.IBMSystemxIMM.IMMComponentLog" + + columns = { + '.1': 'componentLevelVpdTrackingIndex', + '.2': 'componentLevelVpdTrackingFruNumber', + '.3': 'componentLevelVpdTrackingFruName', + '.4': 'componentLevelVpdTrackingSerialNumber', + '.5': 'componentLevelVpdTrackingManufacturingId', + '.6': 'componentLevelVpdTrackingAction', + '.7': 'componentLevelVpdTrackingTimestamp', + } + + # snmpGetTableMaps gets tabular data + snmpGetTableMaps = ( + # Chassis component VPD table + GetTableMap('systemComponentLevelVpdTrackingEntry', '.1.3.6.1.4.1.2.3.51.3.1.5.18.1', columns), + ) + + def process(self, device, results, log): + """collect snmp information from this device""" + log.info('processing %s for device %s', self.name(), device.id) + # Collect the data from device + getdata, tabledata = results + + # Debug: print data retrieved from device. + log.warn( "Get data = %s", getdata ) + log.warn( "Table data = %s", tabledata ) + + VpdTable = tabledata.get("systemComponentLevelVpdTrackingEntry") + + # If no data retrieved return nothing. + if not VpdTable: + log.warn( 'No data collected from %s for the %s plugin', device.id, self.name() ) + log.warn( "Data = %s", getdata ) + log.warn( "Columns = %s", self.columns ) + return + + rm = self.relMap() + + for oid, data in VpdTable.items(): + om = self.objectMap(data) + om.id = self.prepId(om.componentLevelVpdTrackingFruName) + om.componentLevelVpdTrackingIndex = int(om.componentLevelVpdTrackingIndex) + + # Debug: print values of object map. +# for key,value in om.__dict__.items(): +# log.warn("om key=value: %s = %s", key,value) + + rm.append(om) + return rm diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMComponentVpdMap.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMComponentVpdMap.py new file mode 100644 index 0000000..58a14f8 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMComponentVpdMap.py @@ -0,0 +1,83 @@ +# ============================================================================== +# IBMIMMComponentVpdMap modeler plugin +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IBMIMMComponentVpdMap maps chassis component VPD entries associated with an IMM""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin, GetTableMap, GetMap +from Products.DataCollector.plugins.DataMaps import ObjectMap + +class IBMIMMComponentVpdMap(SnmpPlugin): + + relname = "IMMCOMPVPD" + modname = "ZenPacks.community.IBMSystemxIMM.IMMComponentVpd" + + columns = { + '.1': 'componentLevelVpdIndex', + '.2': 'componentLevelVpdFruNumber', + '.3': 'componentLevelVpdFruName', + '.4': 'componentLevelVpdSerialNumber', + '.5': 'componentLevelVpdManufacturingId', + } + + # snmpGetTableMaps gets tabular data + snmpGetTableMaps = ( + # Chassis component VPD table + GetTableMap('systemComponentLevelVpdEntry', '.1.3.6.1.4.1.2.3.51.3.1.5.18.1', columns), + ) + + def process(self, device, results, log): + """collect snmp information from this device""" + log.info('processing %s for device %s', self.name(), device.id) + # Collect the data from device + getdata, tabledata = results + + # Debug: print data retrieved from device. + log.warn( "Get data = %s", getdata ) + log.warn( "Table data = %s", tabledata ) + + VpdTable = tabledata.get("systemComponentLevelVpdEntry") + + # If no data retrieved return nothing. + if not VpdTable: + log.warn( 'No data collected from %s for the %s plugin', device.id, self.name() ) + log.warn( "Data = %s", getdata ) + log.warn( "Columns = %s", self.columns ) + return + + rm = self.relMap() + + for oid, data in VpdTable.items(): + om = self.objectMap(data) + om.id = self.prepId(om.componentLevelVpdFruName) + om.componentLevelVpdIndex = int(om.componentLevelVpdIndex) + + # Debug: print values of object map. +# for key,value in om.__dict__.items(): +# log.warn("om key=value: %s = %s", key,value) + + rm.append(om) + return rm diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMCpuVpdMap.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMCpuVpdMap.py new file mode 100644 index 0000000..f3524b8 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMCpuVpdMap.py @@ -0,0 +1,88 @@ +# ============================================================================== +# IBMIMMCpuVpdMap modeler plugin +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IBMIMMCpuVpdMap maps CPU VPD entries associated with an IMM""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin, GetTableMap, GetMap +from Products.DataCollector.plugins.DataMaps import ObjectMap + +class IBMIMMCpuVpdMap(SnmpPlugin): + + relname = "IMMCPUVPD" + modname = "ZenPacks.community.IBMSystemxIMM.IMMCpuVpd" + + columns = { + '.1': 'cpuVpdIndex', + '.2': 'cpuVpdDescription', + '.3': 'cpuVpdSpeed', + '.4': 'cpuVpdIdentifier', + '.5': 'cpuVpdType', + '.6': 'cpuVpdFamily', + '.7': 'cpuVpdCores', + '.8': 'cpuVpdThreads', + '.9': 'cpuVpdVoltage', + '.10': 'cpuVpdDataWidth', + } + + # snmpGetTableMaps gets tabular data + snmpGetTableMaps = ( + # System CPU VPD table + GetTableMap('systemCPUVpdEntry', '.1.3.6.1.4.1.2.3.51.3.1.5.20.1', columns), + ) + + def process(self, device, results, log): + """collect snmp information from this device""" + log.info('processing %s for device %s', self.name(), device.id) + # Collect the data from device + getdata, tabledata = results + + # Debug: print data retrieved from device. + log.warn( "Get data = %s", getdata ) + log.warn( "Table data = %s", tabledata ) + + VpdTable = tabledata.get("systemCPUVpdEntry") + + # If no data retrieved return nothing. + if not VpdTable: + log.warn( 'No data collected from %s for the %s plugin', device.id, self.name() ) + log.warn( "Data = %s", getdata ) + log.warn( "Columns = %s", self.columns ) + return + + rm = self.relMap() + + for oid, data in VpdTable.items(): + om = self.objectMap(data) + om.id = self.prepId(om.cpuVpdDescription) + om.cpuVpdIndex = int(om.cpuVpdIndex) + + # Debug: print values of object map. +# for key,value in om.__dict__.items(): +# log.warn("om key=value: %s = %s", key,value) + + rm.append(om) + return rm diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMDeviceMap.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMDeviceMap.py new file mode 100644 index 0000000..4c18cda --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMDeviceMap.py @@ -0,0 +1,88 @@ +# ============================================================================== +# IBMIMMDeviceMap modeler plugin +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IBMIMMDeviceMap gets data associated with the IMM at the device level""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin, GetTableMap, GetMap +from Products.DataCollector.plugins.DataMaps import MultiArgs +from Products.DataCollector.plugins.DataMaps import ObjectMap + +class IBMIMMDeviceMap(SnmpPlugin): + + relname = "IMMFWVPD" + modname = "ZenPacks.community.IBMSystemxIMM.IMMDevice" + + snmpGetMap = GetMap({ + '.1.3.6.1.4.1.2.3.51.3.1.5.2.1.2.0' : 'machineLevelVpdMachineModel', + '.1.3.6.1.4.1.2.3.51.3.1.5.2.1.3.0' : 'machineLevelSerialNumber', + '.1.3.6.1.4.1.2.3.51.3.1.5.2.1.4.0' : 'machineLevelUUID', + '.1.3.6.1.4.1.2.3.51.3.1.5.2.1.5.0' : 'machineLevelProductName', + '.1.3.6.1.2.1.1.1.0' : 'sysDescr', + }) + + def process(self, device, results, log): + """collect snmp information from this device""" + log.info('processing %s for device %s', self.name(), device.id) + #Collect data + getdata, tabledata = results + + # Debug: print data retrieved from device. + log.warn( "Get data = %s", getdata ) + log.warn( "Table data = %s", tabledata ) + + om = self.objectMap(getdata) + + # Set values on Overview page + # see: http://community.zenoss.org/docs/DOC-2350 + # setHWTag -> "Tag" field + # setHWSerialNumber -> "Serial Number" field + # setHWProductKey -> "Hardware Model", "Hardware Manufacturer" + # setOSProductKey -> "OS Model", "OS Manufacturer" + # comments -> "Comments" field + # also: snmpContact, snmpSysName, snmpLocation, snmpUpTime + + om.setHWTag = str(om.machineLevelProductName) + om.setHWSerialNumber = str(om.machineLevelSerialNumber) + + log.debug("MTM string length = %i", len(str(om.machineLevelVpdMachineModel))) + + # Expecting 7-char MTM here. If so, break into 4 char Machine Type + 3 char Model, + # hyphenate for readability. Otherwise leave unaltered. + if len(str(om.machineLevelVpdMachineModel)) == 7: + om.machineLevelVpdMachineModel = str(om.machineLevelVpdMachineModel)[:4] + '-' + str(om.machineLevelVpdMachineModel)[-3:] + + # Test... +# om.setHWProductKey = MultiArgs("Hardware Model", "Hardware Manufacturer") +# om.setOSProductKey = MultiArgs("OS Model", "OS Manufacturer") + + om.setHWProductKey = MultiArgs(om.machineLevelVpdMachineModel, "IBM") + om.setOSProductKey = MultiArgs("Integrated Management Module", "IBM") + + # 2nd field of sysDescr is hostname as set on Network Interfaces page in web UI. + om.comments = "IMM Hostname: " + str(om.sysDescr).split(' ')[1] + "\nSystem UUID: " + om.machineLevelUUID + + return om diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMFanMonMap.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMFanMonMap.py new file mode 100644 index 0000000..ddf80ef --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMFanMonMap.py @@ -0,0 +1,87 @@ +# ============================================================================== +# IBMIMMFanMonMap modeler plugin +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IBMIMMFanMonMap maps Fan monitoring entries associated with an IMM""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin, GetTableMap, GetMap +from Products.DataCollector.plugins.DataMaps import ObjectMap + +class IBMIMMFanMonMap(SnmpPlugin): + + relname = "IMMFANMON" + modname = "ZenPacks.community.IBMSystemxIMM.IMMFanMon" + + columns = { + '.1': 'fanIndex', + '.2': 'fanDescr', + '.3': 'fanSpeed', + '.4': 'fanNonRecovLimitHigh', + '.5': 'fanCritLimitHigh', + '.6': 'fanNonCritLimitHigh', + '.7': 'fanNonRecovLimitLow', + '.8': 'fanCritLimitLow', + '.9': 'fanNonCritLimitLow', + } + # snmpGetTableMaps gets tabular data + snmpGetTableMaps = ( + # Fan monitor table + GetTableMap('fanEntry', '.1.3.6.1.4.1.2.3.51.3.1.3.2.1', columns), + ) + + def process(self, device, results, log): + """collect snmp information from this device""" + log.info('processing %s for device %s', self.name(), device.id) + # Collect the data from device + getdata, tabledata = results + + # Debug: print data retrieved from device. + log.warn( "Get data = %s", getdata ) + log.warn( "Table data = %s", tabledata ) + + VpdTable = tabledata.get("fanEntry") + + # If no data retrieved return nothing. + if not VpdTable: + log.warn( 'No data collected from %s for the %s plugin', device.id, self.name() ) + log.warn( "Data = %s", getdata ) + log.warn( "Columns = %s", self.columns ) + return + + rm = self.relMap() + + for oid, data in VpdTable.items(): + om = self.objectMap(data) + om.id = self.prepId(om.fanDescr) + om.snmpindex = int(om.fanIndex) + om.fanIndex = int(om.fanIndex) + + # Debug: print values of object map. +# for key,value in om.__dict__.items(): +# log.warn("om key=value: %s = %s", key,value) + + rm.append(om) + return rm diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMFwVpdMap.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMFwVpdMap.py new file mode 100644 index 0000000..5b560eb --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMFwVpdMap.py @@ -0,0 +1,86 @@ +# ============================================================================== +# IBMIMMFwVpdMap modeler plugin +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IBMIMMFwVpdMap maps Firmware VPD entries associated with an IMM""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin, GetTableMap, GetMap +from Products.DataCollector.plugins.DataMaps import ObjectMap + +class IBMIMMFwVpdMap(SnmpPlugin): + + relname = "IMMFWVPD" + modname = "ZenPacks.community.IBMSystemxIMM.IMMFwVpd" + + columns = { + '.1': 'immVpdIndex', + '.2': 'immVpdType', + '.3': 'immVpdVersionString', + '.4': 'immVpdReleaseDate', + } + + # snmpGetTableMaps gets tabular data + snmpGetTableMaps = ( + # Firmware VPD table + GetTableMap('immVpdEntry', '.1.3.6.1.4.1.2.3.51.3.1.5.1.1', columns), + ) + + def process(self, device, results, log): + """collect snmp information from this device""" + log.info('processing %s for device %s', self.name(), device.id) + # Collect the data from device + getdata, tabledata = results + + # Debug: print data retrieved from device. + log.warn( "Get data = %s", getdata ) + log.warn( "Table data = %s", tabledata ) + + VpdTable = tabledata.get("immVpdEntry") + + # If no data retrieved return nothing. + if not VpdTable: + log.warn( 'No data collected from %s for the %s plugin', device.id, self.name() ) + log.warn( "Data = %s", getdata ) + log.warn( "Columns = %s", self.columns ) + return + + rm = self.relMap() + + for oid, data in VpdTable.items(): + om = self.objectMap(data) +# om.snmpindex = int(om.immVpdIndex) +# om.id = self.prepId("%s_%s" % (om.Port, om.RemoteAddress)) + om.id = self.prepId(om.immVpdType) + om.immVpdIndex = int(om.immVpdIndex) + + # Debug: print values of object map. +# for key,value in om.__dict__.items(): +# log.warn("om key=value: %s = %s", key,value) + + rm.append(om) + return rm + + diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMMemVpdMap.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMMemVpdMap.py new file mode 100644 index 0000000..cb5f23a --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMMemVpdMap.py @@ -0,0 +1,86 @@ +# ============================================================================== +# IBMIMMMemVpdMap modeler plugin +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IBMIMMMemVpdMap maps Memory DIMM VPD entries associated with an IMM""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin, GetTableMap, GetMap +from Products.DataCollector.plugins.DataMaps import ObjectMap + +class IBMIMMMemVpdMap(SnmpPlugin): + + relname = "IMMMEMVPD" + modname = "ZenPacks.community.IBMSystemxIMM.IMMMemVpd" + + columns = { + '.1': 'memoryVpdIndex', + '.2': 'memoryVpdDescription', + '.3': 'memoryVpdPartNumber', + '.4': 'memoryVpdFRUSerialNumber', + '.5': 'memoryVpdManufactureDate', + '.6': 'memoryVpdType', + '.7': 'memoryVpdSize', + } + + # snmpGetTableMaps gets tabular data + snmpGetTableMaps = ( + # Memory VPD table + GetTableMap('systemMemoryVpdEntry', '.1.3.6.1.4.1.2.3.51.3.1.5.21.1', columns), + ) + + def process(self, device, results, log): + """collect snmp information from this device""" + log.info('processing %s for device %s', self.name(), device.id) + # Collect the data from device + getdata, tabledata = results + + # Debug: print data retrieved from device. + log.warn( "Get data = %s", getdata ) + log.warn( "Table data = %s", tabledata ) + + VpdTable = tabledata.get("systemMemoryVpdEntry") + + # If no data retrieved return nothing. + if not VpdTable: + log.warn( 'No data collected from %s for the %s plugin', device.id, self.name() ) + log.warn( "Data = %s", getdata ) + log.warn( "Columns = %s", self.columns ) + return + + rm = self.relMap() + + for oid, data in VpdTable.items(): + om = self.objectMap(data) + om.id = self.prepId(om.memoryVpdDescription) +# om.snmpindex = int(om.memoryVpdIndex) + om.memoryVpdIndex = int(om.memoryVpdIndex) + + # Debug: print values of object map. +# for key,value in om.__dict__.items(): +# log.warn("om key=value: %s = %s", key,value) + + rm.append(om) + return rm diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMVoltMonMap.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMVoltMonMap.py new file mode 100644 index 0000000..209d22d --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMVoltMonMap.py @@ -0,0 +1,92 @@ +# ============================================================================== +# IBMIMMVoltMonMap modeler plugin +# +# Zenoss community Zenpack for IBM SystemX Integrated Management Module +# version: 0.3 +# +# (C) Copyright IBM Corp. 2011. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ============================================================================== + +__doc__="""IBMIMMVoltMonMap maps Voltage monitoring entries associated with an IMM""" +__author__ = "IBM" +__copyright__ = "(C) Copyright IBM Corp. 2011. All Rights Reserved." +__license__ = "GPL" +__version__ = "0.3.0" + +from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin, GetTableMap, GetMap +from Products.DataCollector.plugins.DataMaps import ObjectMap + +class IBMIMMVoltMonMap(SnmpPlugin): + + relname = "IMMVOLTMON" + modname = "ZenPacks.community.IBMSystemxIMM.IMMVoltMon" + + columns = { + '.1': 'voltIndex', + '.2': 'voltDescr', + '.3': 'voltReading', + '.4': 'voltNominalReading', +# '.5': 'voltNonRecovLimitHigh', + '.6': 'voltCritLimitHigh', +# '.7': 'voltNonCritLimitHigh', +# '.8': 'voltNonRecovLimitLow', + '.9': 'voltCritLimitLow', +# '.10': 'voltNonCritLimitLow', + } + # snmpGetTableMaps gets tabular data + snmpGetTableMaps = ( + # Voltage monitor table + GetTableMap('voltEntry', '.1.3.6.1.4.1.2.3.51.3.1.2.2.1', columns), + ) + + def process(self, device, results, log): + """collect snmp information from this device""" + log.info('processing %s for device %s', self.name(), device.id) + # Collect the data from device + getdata, tabledata = results + + # Debug: print data retrieved from device. + log.warn( "Get data = %s", getdata ) + log.warn( "Table data = %s", tabledata ) + + VpdTable = tabledata.get("voltEntry") + + # If no data retrieved return nothing. + if not VpdTable: + log.warn( 'No data collected from %s for the %s plugin', device.id, self.name() ) + log.warn( "Data = %s", getdata ) + log.warn( "Columns = %s", self.columns ) + return + + rm = self.relMap() + + for oid, data in VpdTable.items(): + om = self.objectMap(data) + om.id = self.prepId(om.voltDescr) + om.snmpindex = int(om.voltIndex) +# om.voltIndex = int(om.voltIndex) + om.voltReading = float(om.voltReading)/1000 + om.voltNominalReading = float(om.voltNominalReading)/1000 + om.voltCritLimitHigh = float(om.voltCritLimitHigh)/1000 + om.voltCritLimitLow = float(om.voltCritLimitLow)/1000 + + # Debug: print values of object map. +# for key,value in om.__dict__.items(): +# log.warn("om key=value: %s = %s", key,value) + + rm.append(om) + return rm diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/__init__.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/objects/objects.xml b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/objects/objects.xml new file mode 100644 index 0000000..7717cc0 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/objects/objects.xml @@ -0,0 +1,816 @@ + + + + + +Integrated Management Module + + +Integrated Management Module + + +['zenoss.snmp.NewDeviceMap', 'zenoss.snmp.DeviceMap', 'community.snmp.IBMIMMDeviceMap', 'community.snmp.IBMIMMFwVpdMap', 'community.snmp.IBMIMMCpuVpdMap', 'community.snmp.IBMIMMMemVpdMap', 'community.snmp.IBMIMMComponentLogMap', 'community.snmp.IBMIMMComponentVpdMap', 'community.snmp.IBMIMMFanMonMap', 'community.snmp.IBMIMMVoltMonMap'] + + +10.0 + + +ZenPacks.community.IBMSystemxIMM.IMMDevice + + +['Device', 'IMMAmbientTemp'] + + + + +Products.ZenModel.Device + + + + +SNMP + + +True + + +/Cmd/Fail + + +3 + + +300 + + +.1.3.6.1.4.1.2.3.51.3.1.1.2.1.3.1 + + +False + + +Auto + + + + +GAUGE + + +True + + + + + + + + +100 + + +500 + + +Degrees Celsius + + +False + + +False + + +-1 + + +-1 + + +True + + + + +AREA + + +1 + + +False + + +%5.2lf%s + + +${graphPoint/id} + + +-1 + + +tempReadingAmbient_tempReadingAmbient + + +AVERAGE + + + + + + + + +Products.ZenModel.Device + + + + +COMMAND + + +True + + +fanSpeed + + +/Cmd/Fail + + +3 + + +/usr/bin/snmpget -Oqv -v1 -c${device/zSnmpCommunity} ${device/manageIp} 1.3.6.1.4.1.2.3.51.3.1.3.2.1.3.${here/snmpindex} | sed -e 's/[^0-9]//g' -e 's/^/Fan speed | fanSpeed=/' + + +300 + + +False + + +Auto + + + + +GAUGE + + +True + + + + + + + + +100 + + +500 + + +Fan Speed (%) + + +False + + +False + + +-1 + + +-1 + + +True + + + + +LINE + + +1 + + +False + + +%5.2lf%s + + +${graphPoint/id} + + +-1 + + +fanSpeed_fanSpeed + + +AVERAGE + + + + + + + + +Products.ZenModel.Device + + + + +SNMP + + +True + + +/Cmd/Fail + + +3 + + +300 + + +.1.3.6.1.4.1.2.3.51.3.1.2.2.1.3 + + +False + + +Auto + + + + +GAUGE + + +True + + + + + + + + +100 + + +500 + + +Volts + + +False + + +False + + +-1 + + +-1 + + +True + + + + +LINE + + +1 + + +False + + +%5.2lf%s + + +${graphPoint/id} + + +-1 + + +1000,/ + + +voltReading_voltReading + + +AVERAGE + + + + + + + + + + + +Events from an IBM Integrated Management Module + + +Events from an IBM Integrated Management Module + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapAppS + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapBootS + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapCPUC + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapCPUN + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapFanC + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapFanN + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapHardwareC + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapHardwareN + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapHdC + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapIhcC + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapLdrToS + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapMemoryC + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapMemoryN + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapNwChangeS + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapOsToS + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapPFAS + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapPoffS + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapPonS + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapPowerC + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapPowerN + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapRLogin + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapRdpsC + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapRdpsN + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapSysLogS + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapTempC + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapTempN + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapVoltC + + +7 + + + + +evt.summary = evt.altMsgText + " (" + evt.eventClassKey + ")" + +if evt.altPriority == 0: evt.severity = 5 +elif evt.altPriority == 2: evt.severity = 3 +elif evt.altPriority == 4: evt.severity = 2 +elif evt.altPriority == 8: evt.severity = 0 +else: evt.severity = 4 + + +ibmSpTrapVoltN + + +7 + + + + + diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/resources/IBMSystemxIMM.js b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/resources/IBMSystemxIMM.js new file mode 100644 index 0000000..d822382 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/resources/IBMSystemxIMM.js @@ -0,0 +1,549 @@ +(function(){ + +var ZC = Ext.ns('Zenoss.component'); + +function render_link(ob) { + if (ob && ob.uid) { + return Zenoss.render.link(ob.uid); + } else { + return ob; + } +} + +ZC.IMMFwVpdPanel = Ext.extend(ZC.ComponentGridPanel, { + constructor: function(config) { + config = Ext.applyIf(config||{}, { + componentType: 'IMMFwVpd', + fields: [ + {name: 'uid'}, + {name: 'name'}, + {name: 'severity'}, + {name: 'status'}, + {name: 'hasMonitor'}, + {name: 'monitor'}, + {name: 'immVpdIndex'}, + {name: 'immVpdType'}, + {name: 'immVpdVersionString'}, + {name: 'immVpdReleaseDate'}, + ], + /* These are the columns that will appear in the 3.0-style Component details panel (i.e. ComponentGridPanel) + Note: there seems to be a requirement for a column with id: 'name'; the table will not display without it. Must be a key of some kind. + Still, seems odd, since we don't have to actually DISPLAY the data in that variable (dataIndex can point to something else, that is). + */ + // Column designated here will take up remaining field width in the table. Appears to be 'name' by default. + // Making the last column in the table the autoexpand essentially left-justifies the columns, seems to be a good practice. + autoExpandColumn: 'immVpdReleaseDate', + columns: [{ + id: 'severity', + dataIndex: 'severity', + header: _t('Events'), + renderer: Zenoss.render.severity, + width: 50 + },{ + id: 'immVpdIndex', + dataIndex: 'immVpdIndex', + header: _t('ID'), + sortable: true, + width: 50 + },{ +// id: 'immVpdType', + id: 'name', + dataIndex: 'immVpdType', + header: _t('Firmware Type'), + sortable: true, + },{ + id: 'immVpdVersionString', + dataIndex: 'immVpdVersionString', + header: _t('Version'), + sortable: true, + },{ + id: 'immVpdReleaseDate', + dataIndex: 'immVpdReleaseDate', + header: _t('Release Date'), + sortable: true, +// },{ +// id: 'renderTest1', +// dataIndex: 'immVpdType', +// header: _t('Render function test 1'), +// sortable: true, +// width: 200, +// // Most basic example of renderer... +// renderer: function(arbitraryVarName) { +// return "Embed a value like: " + arbitraryVarName + " in a fmt string"; +// }, +// },{ +// id: 'renderTest2', +// dataIndex: 'immVpdType', +// header: _t('Render function test 2'), +// sortable: true, +// width: 200, +// // Renderer with a conditional... +// renderer: function(immVpdType) { +// if (immVpdType=='IMM') { +//// return "The IMM FW"; +// return Zenoss.render.pingStatus('up'); +// } else { +//// return "NOT the IMM FW"; +// return Zenoss.render.pingStatus('down'); +// } +// }, +// },{ +// // Not sure about this one... +// id: 'renderTest3', +// dataIndex: 'name', +// header: _t('Render function test 3'), +// sortable: true, +// width: 200, +// renderer: function(obj) { +// return Zenoss.render.DeviceClass(obj.uid, obj.name); +// }, +// },{ +// id: 'name', +// dataIndex: 'name', +// header: _t('Name'), +// width: 50, +// sortable: true, + }] + }); + ZC.IMMFwVpdPanel.superclass.constructor.call(this, config); + } +}); +// Register the above grid panel... +Ext.reg('IMMFwVpdPanel', ZC.IMMFwVpdPanel); +// The registered name (field 1) must match the value of: portal_type = meta_type = 'xxxx' in the Component's object class. +// The remaining fields determine the label that appears in the UI under Components heading when single or multiple objects are found, respectively. +ZC.registerName('IMMFwVpd', _t('IMM Firmware VPD'), _t('IMM Firmware VPD')); + +ZC.IMMCpuVpdPanel = Ext.extend(ZC.ComponentGridPanel, { + constructor: function(config) { + config = Ext.applyIf(config||{}, { + componentType: 'IMMCpuVpd', + fields: [ + {name: 'uid'}, + {name: 'name'}, + {name: 'severity'}, + {name: 'status'}, + {name: 'hasMonitor'}, + {name: 'monitor'}, + {name: 'cpuVpdIndex'}, + {name: 'cpuVpdDescription'}, + {name: 'cpuVpdSpeed'}, + {name: 'cpuVpdIdentifier'}, + {name: 'cpuVpdType'}, + {name: 'cpuVpdFamily'}, + {name: 'cpuVpdCores'}, + {name: 'cpuVpdThreads'}, + {name: 'cpuVpdVoltage'}, + {name: 'cpuVpdDataWidth'}, + ], + autoExpandColumn: 'cpuVpdDataWidth', + columns: [{ + id: 'severity', + dataIndex: 'severity', + header: _t('Events'), + renderer: Zenoss.render.severity, + width: 50 + },{ + id: 'cpuVpdIndex', + dataIndex: 'cpuVpdIndex', + header: _t('ID'), + sortable: true, + width: 50 + },{ +// id: 'cpuVpdDescription', + id: 'name', + dataIndex: 'cpuVpdDescription', + header: _t('Description'), + sortable: true, + },{ + id: 'cpuVpdSpeed', + dataIndex: 'cpuVpdSpeed', +// header: _t('Speed (MHz)'), + header: _t('Speed'), + sortable: true, + renderer: function(arbitraryVarName) { + return arbitraryVarName + " MHz"; + }, + },{ + id: 'cpuVpdIdentifier', + dataIndex: 'cpuVpdIdentifier', + header: _t('Identifier'), + sortable: true, + },{ + id: 'cpuVpdType', + dataIndex: 'cpuVpdType', + header: _t('Type'), + sortable: true, + },{ + id: 'cpuVpdFamily', + dataIndex: 'cpuVpdFamily', + header: _t('Family'), + sortable: true, + },{ + id: 'cpuVpdCores', + dataIndex: 'cpuVpdCores', + header: _t('Cores'), + sortable: true, + },{ + id: 'cpuVpdThreads', + dataIndex: 'cpuVpdThreads', + header: _t('Threads'), + sortable: true, + },{ + id: 'cpuVpdVoltage', + dataIndex: 'cpuVpdVoltage', + header: _t('Voltage'), + sortable: true, + },{ + id: 'cpuVpdDataWidth', + dataIndex: 'cpuVpdDataWidth', + header: _t('Data Width'), + sortable: true, +// },{ +// id: 'name', +// dataIndex: 'name', +// header: _t('Name'), +// width: 50, +// sortable: true, + }] + }); + ZC.IMMCpuVpdPanel.superclass.constructor.call(this, config); + } +}); +Ext.reg('IMMCpuVpdPanel', ZC.IMMCpuVpdPanel); +ZC.registerName('IMMCpuVpd', _t('IMM CPU VPD'), _t('IMM CPU VPD')); + +ZC.IMMMemVpdPanel = Ext.extend(ZC.ComponentGridPanel, { + constructor: function(config) { + config = Ext.applyIf(config||{}, { + componentType: 'IMMMemVpd', + fields: [ + {name: 'uid'}, + {name: 'name'}, + {name: 'severity'}, + {name: 'status'}, + {name: 'hasMonitor'}, + {name: 'monitor'}, + {name: 'memoryVpdIndex'}, + {name: 'memoryVpdDescription'}, + {name: 'memoryVpdPartNumber'}, + {name: 'memoryVpdFRUSerialNumber'}, + {name: 'memoryVpdManufactureDate'}, + {name: 'memoryVpdType'}, + {name: 'memoryVpdSize'}, + ], + autoExpandColumn: 'memoryVpdSize', + columns: [{ + id: 'severity', + dataIndex: 'severity', + header: _t('Events'), + renderer: Zenoss.render.severity, + width: 50 + },{ + id: 'memoryVpdIndex', + dataIndex: 'memoryVpdIndex', + header: _t('ID'), + sortable: true, + width: 50 + },{ +// id: 'memoryVpdDescription', + id: 'name', + dataIndex: 'memoryVpdDescription', + header: _t('Description'), + sortable: true, + },{ + id: 'memoryVpdPartNumber', + dataIndex: 'memoryVpdPartNumber', + header: _t('Part Number'), + sortable: true, + width: 150 + },{ + id: 'memoryVpdFRUSerialNumber', + dataIndex: 'memoryVpdFRUSerialNumber', + header: _t('Serial Number'), + sortable: true, + },{ + id: 'memoryVpdManufactureDate', + dataIndex: 'memoryVpdManufactureDate', + header: _t('Manufacture Date'), + sortable: true, + },{ + id: 'memoryVpdType', + dataIndex: 'memoryVpdType', + header: _t('Type'), + sortable: true, + },{ + id: 'memoryVpdSize', + dataIndex: 'memoryVpdSize', + header: _t('Size'), + sortable: true, + renderer: function(arbitraryVarName) { + return arbitraryVarName + " GB"; + }, +// },{ +// id: 'name', +// dataIndex: 'name', +// header: _t('Name'), +// width: 50, +// sortable: true, + }] + }); + ZC.IMMMemVpdPanel.superclass.constructor.call(this, config); + } +}); +Ext.reg('IMMMemVpdPanel', ZC.IMMMemVpdPanel); +ZC.registerName('IMMMemVpd', _t('IMM Memory VPD'), _t('IMM Memory VPD')); + +ZC.IMMComponentVpdPanel = Ext.extend(ZC.ComponentGridPanel, { + constructor: function(config) { + config = Ext.applyIf(config||{}, { + componentType: 'IMMComponentVpd', + fields: [ + {name: 'uid'}, + {name: 'name'}, + {name: 'severity'}, + {name: 'status'}, + {name: 'hasMonitor'}, + {name: 'monitor'}, + {name: 'componentLevelVpdIndex'}, + {name: 'componentLevelVpdFruNumber'}, + {name: 'componentLevelVpdFruName'}, + {name: 'componentLevelVpdSerialNumber'}, + {name: 'componentLevelVpdManufacturingId'}, + ], + autoExpandColumn: 'componentLevelVpdManufacturingId', + columns: [{ + id: 'severity', + dataIndex: 'severity', + header: _t('Events'), + renderer: Zenoss.render.severity, + width: 50 + },{ + id: 'componentLevelVpdIndex', + dataIndex: 'componentLevelVpdIndex', + header: _t('ID'), + sortable: true, + width: 50 + },{ + id: 'componentLevelVpdFruNumber', + dataIndex: 'componentLevelVpdFruNumber', + header: _t('FRU Number'), + sortable: true, + },{ +// id: 'componentLevelVpdFruName', + id: 'name', + dataIndex: 'componentLevelVpdFruName', + header: _t('FRU Name'), + sortable: true, + width: 150 + },{ + id: 'componentLevelVpdSerialNumber', + dataIndex: 'componentLevelVpdSerialNumber', + header: _t('Serial Number'), + sortable: true, + },{ + id: 'componentLevelVpdManufacturingId', + dataIndex: 'componentLevelVpdManufacturingId', + header: _t('Manufacturer'), + sortable: true, + }] + }); + ZC.IMMComponentVpdPanel.superclass.constructor.call(this, config); + } +}); +Ext.reg('IMMComponentVpdPanel', ZC.IMMComponentVpdPanel); +ZC.registerName('IMMComponentVpd', _t('IMM Chassis Component VPD'), _t('IMM Chassis Component VPD')); + +ZC.IMMComponentLogPanel = Ext.extend(ZC.ComponentGridPanel, { + constructor: function(config) { + config = Ext.applyIf(config||{}, { + componentType: 'IMMComponentLog', + fields: [ + {name: 'uid'}, + {name: 'name'}, + {name: 'severity'}, + {name: 'status'}, + {name: 'hasMonitor'}, + {name: 'monitor'}, + {name: 'componentLevelVpdTrackingIndex'}, + {name: 'componentLevelVpdTrackingFruNumber'}, + {name: 'componentLevelVpdTrackingFruName'}, + {name: 'componentLevelVpdTrackingSerialNumber'}, + {name: 'componentLevelVpdTrackingManufacturingId'}, + {name: 'componentLevelVpdTrackingAction'}, + {name: 'componentLevelVpdTrackingTimestamp'}, + ], + autoExpandColumn: 'componentLevelVpdTrackingTimestamp', + columns: [{ + id: 'severity', + dataIndex: 'severity', + header: _t('Events'), + renderer: Zenoss.render.severity, + width: 50 + },{ + id: 'componentLevelVpdTrackingIndex', + dataIndex: 'componentLevelVpdTrackingIndex', + header: _t('ID'), + sortable: true, + width: 50 + },{ + id: 'componentLevelVpdTrackingFruNumber', + dataIndex: 'componentLevelVpdTrackingFruNumber', + header: _t('FRU Number'), + sortable: true, + },{ +// id: 'componentLevelVpdTrackingFruName', + id: 'name', + dataIndex: 'componentLevelVpdTrackingFruName', + header: _t('FRU Name'), + sortable: true, + width: 150 + },{ + id: 'componentLevelVpdTrackingSerialNumber', + dataIndex: 'componentLevelVpdTrackingSerialNumber', + header: _t('Serial Number'), + sortable: true, + },{ + id: 'componentLevelVpdTrackingManufacturingId', + dataIndex: 'componentLevelVpdTrackingManufacturingId', + header: _t('Manufacturer'), + sortable: true, + },{ + id: 'componentLevelVpdTrackingAction', + dataIndex: 'componentLevelVpdTrackingAction', + header: _t('Action'), + sortable: true, + },{ + id: 'componentLevelVpdTrackingTimestamp', + dataIndex: 'componentLevelVpdTrackingTimestamp', + header: _t('Timestamp'), + sortable: true, + }] + }); + ZC.IMMComponentLogPanel.superclass.constructor.call(this, config); + } +}); +Ext.reg('IMMComponentLogPanel', ZC.IMMComponentLogPanel); +ZC.registerName('IMMComponentLog', _t('IMM Chassis Component Log'), _t('IMM Chassis Component Log')); + +ZC.IMMFanMonPanel = Ext.extend(ZC.ComponentGridPanel, { + constructor: function(config) { + config = Ext.applyIf(config||{}, { + componentType: 'IMMFanMon', + fields: [ + {name: 'uid'}, + {name: 'name'}, + {name: 'severity'}, + {name: 'status'}, + {name: 'hasMonitor'}, + {name: 'monitor'}, + {name: 'fanIndex'}, + {name: 'fanDescr'}, + {name: 'fanSpeed'}, + {name: 'fanCritLimitLow'}, + ], + autoExpandColumn: 'fanCritLimitLow', + columns: [{ + id: 'severity', + dataIndex: 'severity', + header: _t('Events'), + renderer: Zenoss.render.severity, + width: 50 + },{ + id: 'fanIndex', + dataIndex: 'fanIndex', + header: _t('ID'), + sortable: true, + width: 50 + },{ +// id: 'fanDescr', + id: 'name', + dataIndex: 'fanDescr', + header: _t('Description'), + sortable: true, + width: 150 + },{ + id: 'fanSpeed', + dataIndex: 'fanSpeed', + header: _t('Fan Speed'), + sortable: true, + },{ + id: 'fanCritLimitLow', + dataIndex: 'fanCritLimitLow', + header: _t('Critical Low Limit'), + sortable: true, + }] + }); + ZC.IMMFanMonPanel.superclass.constructor.call(this, config); + } +}); +Ext.reg('IMMFanMonPanel', ZC.IMMFanMonPanel); +ZC.registerName('IMMFanMon', _t('IMM Fan Monitor'), _t('IMM Fan Monitors')); + +ZC.IMMVoltMonPanel = Ext.extend(ZC.ComponentGridPanel, { + constructor: function(config) { + config = Ext.applyIf(config||{}, { + componentType: 'IMMVoltMon', + fields: [ + {name: 'uid'}, + {name: 'name'}, + {name: 'severity'}, + {name: 'status'}, + {name: 'hasMonitor'}, + {name: 'monitor'}, + {name: 'voltIndex'}, + {name: 'voltDescr'}, + {name: 'voltReading'}, + {name: 'voltNominalReading'}, + {name: 'voltCritLimitHigh'}, + {name: 'voltCritLimitLow'}, + ], + autoExpandColumn: 'voltCritLimitLow', + columns: [{ + id: 'severity', + dataIndex: 'severity', + header: _t('Events'), + renderer: Zenoss.render.severity, + width: 50 + },{ + id: 'voltIndex', + dataIndex: 'voltIndex', + header: _t('ID'), + sortable: true, + width: 50 + },{ +// id: 'voltDescr', + id: 'name', + dataIndex: 'voltDescr', + header: _t('Description'), + sortable: true, + width: 150 + },{ + id: 'voltReading', + dataIndex: 'voltReading', + header: _t('Current Reading'), + sortable: true, + },{ + id: 'voltNominalReading', + dataIndex: 'voltNominalReading', + header: _t('Nominal Reading'), + sortable: true, + },{ + id: 'voltCritLimitHigh', + dataIndex: 'voltCritLimitHigh', + header: _t('Critical High Limit'), + sortable: true, + },{ + id: 'voltCritLimitLow', + dataIndex: 'voltCritLimitLow', + header: _t('Critical Low Limit'), + sortable: true, + }] + }); + ZC.IMMVoltMonPanel.superclass.constructor.call(this, config); + } +}); +Ext.reg('IMMVoltMonPanel', ZC.IMMVoltMonPanel); +ZC.registerName('IMMVoltMon', _t('IMM Voltage Monitor'), _t('IMM Voltage Monitors')); + +})(); diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMComponentLogDetail.pt b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMComponentLogDetail.pt new file mode 100644 index 0000000..ffee4d5 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMComponentLogDetail.pt @@ -0,0 +1,70 @@ + + + +
+ + + + + + + + + + + + + + + + + + + + + + No items found. Double check you have the correct collector plugin and you have remodeled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMComponentVpdDetail.pt b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMComponentVpdDetail.pt new file mode 100644 index 0000000..804d699 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMComponentVpdDetail.pt @@ -0,0 +1,66 @@ + + + +
+ + + + + + + + + + + + + + + + + + + + No items found. Double check you have the correct collector plugin and you have remodeled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMCpuVpdDetail.pt b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMCpuVpdDetail.pt new file mode 100644 index 0000000..cca342d --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMCpuVpdDetail.pt @@ -0,0 +1,76 @@ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + No items found. Double check you have the correct collector plugin and you have remodeled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMFanMonDetail.pt b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMFanMonDetail.pt new file mode 100644 index 0000000..321867a --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMFanMonDetail.pt @@ -0,0 +1,64 @@ + + + +
+ + + + + + + + + + + + + + + + + + + No items found. Double check you have the correct collector plugin and you have remodeled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMFwVpdDetail.pt b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMFwVpdDetail.pt new file mode 100644 index 0000000..38135b5 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMFwVpdDetail.pt @@ -0,0 +1,70 @@ + + + +
+ + + + + + + + + + + + + + + + + + + No items found. Double check you have the correct collector plugin and you have remodeled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMMemVpdDetail.pt b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMMemVpdDetail.pt new file mode 100644 index 0000000..a4e98ae --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMMemVpdDetail.pt @@ -0,0 +1,70 @@ + + + +
+ + + + + + + + + + + + + + + + + + + + + + No items found. Double check you have the correct collector plugin and you have remodeled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMVoltMonDetail.pt b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMVoltMonDetail.pt new file mode 100644 index 0000000..58ae1c5 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/skins/ZenPacks.community.IBMSystemxIMM/IMMVoltMonDetail.pt @@ -0,0 +1,68 @@ + + + +
+ + + + + + + + + + + + + + + + + + + + + No items found. Double check you have the correct collector plugin and you have remodeled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/tests/__init__.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/tests/__init__.py new file mode 100644 index 0000000..f8927bd --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/IBMSystemxIMM/tests/__init__.py @@ -0,0 +1,12 @@ +# ########################################################################## +# +# This program is part of Zenoss Core, an open source monitoring platform. +# Copyright (C) 2008, Zenoss Inc. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# For complete information please visit: http://www.zenoss.com/oss/ +# +# ########################################################################## diff --git a/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/__init__.py b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/__init__.py new file mode 100644 index 0000000..de40ea7 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/ZenPacks/community/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/ZenPacks.community.IBMSystemxIMM/setup.py b/ZenPacks.community.IBMSystemxIMM/setup.py new file mode 100644 index 0000000..99ce207 --- /dev/null +++ b/ZenPacks.community.IBMSystemxIMM/setup.py @@ -0,0 +1,69 @@ +################################ +# These variables are overwritten by Zenoss when the ZenPack is exported +# or saved. Do not modify them directly here. +# NB: PACKAGES is deprecated +NAME = "ZenPacks.community.IBMSystemxIMM" +VERSION = "0.3.1" +AUTHOR = "IBM" +LICENSE = "" +NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.community'] +PACKAGES = ['ZenPacks', 'ZenPacks.community', 'ZenPacks.community.IBMSystemxIMM'] +INSTALL_REQUIRES = [] +COMPAT_ZENOSS_VERS = ">= 3.0" +PREV_ZENPACK_NAME = "" +# STOP_REPLACEMENTS +################################ +# Zenoss will not overwrite any changes you make below here. + +from setuptools import setup, find_packages + +setup( + # This ZenPack metadata should usually be edited with the Zenoss + # ZenPack edit page. Whenever the edit page is submitted it will + # overwrite the values below (the ones it knows about) with new values. + name = NAME, + version = VERSION, + author = AUTHOR, + license = LICENSE, + + # This is the version spec which indicates what versions of Zenoss + # this ZenPack is compatible with + compatZenossVers = COMPAT_ZENOSS_VERS, + + # previousZenPackName is a facility for telling Zenoss that the name + # of this ZenPack has changed. If no ZenPack with the current name is + # installed then a zenpack of this name if installed will be upgraded. + prevZenPackName = PREV_ZENPACK_NAME, + + # Indicate to setuptools which namespace packages the zenpack + # participates in + namespace_packages = NAMESPACE_PACKAGES, + + # Tell setuptools what packages this zenpack provides. + packages = find_packages(), + + # Tell setuptools to figure out for itself which files to include + # in the binary egg when it is built. + include_package_data = True, + + # The MANIFEST.in file is the recommended way of including additional files + # in your ZenPack. package_data is another. + #package_data = {} + + # Indicate dependencies on other python modules or ZenPacks. This line + # is modified by zenoss when the ZenPack edit page is submitted. Zenoss + # tries to put add/delete the names it manages at the beginning of this + # list, so any manual additions should be added to the end. Things will + # go poorly if this line is broken into multiple lines or modified to + # dramatically. + install_requires = INSTALL_REQUIRES, + + # Every ZenPack egg must define exactly one zenoss.zenpacks entry point + # of this form. + entry_points = { + 'zenoss.zenpacks': '%s = %s' % (NAME, NAME), + }, + + # All ZenPack eggs must be installed in unzipped form. + zip_safe = False, +)