Permalink
Browse files

AIX SNMP 1.1

git-svn-id: http://zenpacks.zenoss.org/svn/zenpacks@249 db08cffe-75b9-45d1-af1a-46ad9ef135f6
  • Loading branch information...
0 parents commit 8a9aa3a7a34e7b6134521a8dda7a819bd5f6eb4c Matt Ray committed Jun 15, 2009
Showing with 25,305 additions and 0 deletions.
  1. +16 −0 COPYRIGHT.txt
  2. +1 −0 MANIFEST.in
  3. +1 −0 ZenPacks/__init__.py
  4. +68 −0 ZenPacks/community/AIX/AIXBase.py
  5. +106 −0 ZenPacks/community/AIX/AIXCdrom.py
  6. +24 −0 ZenPacks/community/AIX/AIXDeviceHW.py
  7. +53 −0 ZenPacks/community/AIX/AIXExpansionCard.py
  8. +145 −0 ZenPacks/community/AIX/AIXFileSystem.py
  9. +55 −0 ZenPacks/community/AIX/AIXHardDisk.py
  10. +225 −0 ZenPacks/community/AIX/AIXLogicalVolume.py
  11. +138 −0 ZenPacks/community/AIX/AIXLparInfo.py
  12. +372 −0 ZenPacks/community/AIX/AIXOperatingSystem.py
  13. +101 −0 ZenPacks/community/AIX/AIXPaging.py
  14. +87 −0 ZenPacks/community/AIX/AIXPhysicalVolume.py
  15. +103 −0 ZenPacks/community/AIX/AIXPrintQueue.py
  16. +96 −0 ZenPacks/community/AIX/AIXPrinter.py
  17. +109 −0 ZenPacks/community/AIX/AIXTape.py
  18. +307 −0 ZenPacks/community/AIX/AIXVolumeGroup.py
  19. +198 −0 ZenPacks/community/AIX/__init__.py
  20. +54 −0 ZenPacks/community/AIX/libexec/AIX_collect_usedBlocks
  21. +82 −0 ZenPacks/community/AIX/libexec/AIX_memAvailSwap
  22. +58 −0 ZenPacks/community/AIX/libexec/AIX_paging_used
  23. +96 −0 ZenPacks/community/AIX/libexec/AIX_ssCpuRawStats
  24. +41 −0 ZenPacks/community/AIX/libexec/collector_utils.py
  25. 0 ZenPacks/community/AIX/modeler/__init__.py
  26. 0 ZenPacks/community/AIX/modeler/plugins/__init__.py
  27. 0 ZenPacks/community/AIX/modeler/plugins/community/__init__.py
  28. +72 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXBase.py
  29. +130 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXCPUMap.py
  30. +80 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXCdromMap.py
  31. +32 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXDeviceMap.py
  32. +244 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXInterfaceMap.py
  33. +79 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXLparInfoMap.py
  34. +75 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXPCIMap.py
  35. +95 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXPrintQueueMap.py
  36. +74 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXPrinterMap.py
  37. +49 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXSWInstalledMap.py
  38. +81 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXTapeMap.py
  39. +236 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXVolumeGroupMap.py
  40. +84 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXhdiskMap.py
  41. +82 −0 ZenPacks/community/AIX/modeler/plugins/community/snmp/AIXmemory.py
  42. 0 ZenPacks/community/AIX/modeler/plugins/community/snmp/__init__.py
  43. +18,706 −0 ZenPacks/community/AIX/objects/objects.xml
  44. +543 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/aixdeviceHardwareDetail.pt
  45. +811 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/aixdeviceOsDetail.pt
  46. +19 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/aixdialog_changeFSMonitoring.pt
  47. +19 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/aixdialog_changeLVMonitoring.pt
  48. +19 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/aixdialog_changePQMonitoring.pt
  49. +19 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/aixdialog_changePVMonitoring.pt
  50. +19 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/aixdialog_changeVGMonitoring.pt
  51. +43 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/aixdialog_lockFileSystems.pt
  52. +43 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/aixdialog_lockLogicalVolumes.pt
  53. +43 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/aixdialog_lockPhysicalVolumes.pt
  54. +25 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/aixdialog_lockPrintQueues.pt
  55. +43 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/aixdialog_lockVolumeGroups.pt
  56. 0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/placeholder.txt
  57. +154 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/viewAIXFileSystem.pt
  58. +255 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/viewLogicalVolume.pt
  59. +144 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/viewPaging.pt
  60. +77 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/viewPhysicalVolume.pt
  61. +60 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/viewPrintQueue.pt
  62. +244 −0 ZenPacks/community/AIX/skins/ZenPacks.community.AIX/viewVolumeGroup.pt
  63. +1 −0 ZenPacks/community/__init__.py
  64. +69 −0 setup.py
@@ -0,0 +1,16 @@
+All files in this directory and below are:
+
+Copyright (c) 2009 Zenoss, Inc. 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 version 2 as published
+by the Free Software Foundation.
+
+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.
@@ -0,0 +1 @@
+graft ZenPacks
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
@@ -0,0 +1,68 @@
+from Globals import InitializeClass
+from Products.ZenModel.ZenossSecurity import ZEN_VIEW
+from Products.ZenModel.Device import Device
+from Products.ZenModel.ManagedEntity import ManagedEntity
+from Products.ZenModel.ZenStatus import ZenStatus
+from ZenPacks.community.AIX.AIXOperatingSystem import AIXOperatingSystem
+from ZenPacks.community.AIX.AIXDeviceHW import AIXDeviceHW
+
+class AIXBase(Device):
+ #Aix Base class
+
+
+ # Initialize the new class and rebuild the relations
+ # Need to override the os object
+ # Need to override the hw object
+ # Override factory_type_information
+ # __init__ taken from Device.py and override os and hw
+ def __init__(self, id, buildRelations=True):
+ ManagedEntity.__init__(self, id, buildRelations=buildRelations)
+ os = AIXOperatingSystem()
+ self._setObject(os.id, os)
+ hw = AIXDeviceHW()
+ self._setObject(hw.id, hw)
+ #self.commandStatus = "Not Tested"
+ self._lastPollSnmpUpTime = ZenStatus(0)
+ self._snmpLastCollection = 0
+ self._lastChange = 0
+
+ factory_type_information = (
+ {
+ 'immediate_view' : 'deviceStatus',
+ 'actions' :
+ (
+ { 'id' : 'status'
+ , 'name' : 'Status'
+ , 'action' : 'deviceStatus'
+ , 'permissions' : (ZEN_VIEW, )
+ },
+ { 'id' : 'osdetail'
+ , 'name' : 'OS'
+ , 'action' : 'aixdeviceOsDetail'
+ , 'permissions' : (ZEN_VIEW, )
+ },
+ { 'id' : 'hwdetail'
+ , 'name' : 'Hardware'
+ , 'action' : 'aixdeviceHardwareDetail'
+ , 'permissions' : (ZEN_VIEW, )
+ },
+ { 'id' : 'events'
+ , 'name' : 'Events'
+ , 'action' : 'viewEvents'
+ , 'permissions' : (ZEN_VIEW, )
+ },
+ { 'id' : 'perfServer'
+ , 'name' : 'Perf'
+ , 'action' : 'viewDevicePerformance'
+ , 'permissions' : (ZEN_VIEW, )
+ },
+ { 'id' : 'edit'
+ , 'name' : 'Edit'
+ , 'action' : 'editDevice'
+ , 'permissions' : ("Change Device",)
+ },
+ )
+ },
+ )
+
+InitializeClass(AIXBase)
@@ -0,0 +1,106 @@
+__doc__="""AIX Cdrom
+
+"""
+__version__ = "$Revision: 1.7 $"[11:-2]
+
+from Globals import DTMLFile
+from Globals import InitializeClass
+
+from Products.ZenRelations.RelSchema import *
+
+from Products.ZenModel.HWComponent import HWComponent
+
+from Products.ZenModel.ZenossSecurity import *
+
+def manage_addCdrom(context, id, title = None, REQUEST = None):
+ """make a filesystem"""
+ cd = AIXCdrom(id, title)
+ context._setObject(id, cd)
+ cd = context._getOb(id)
+
+ if REQUEST is not None:
+ REQUEST['RESPONSE'].redirect(context.absolute_url()
+ +'/manage_main')
+
+addCdrom = DTMLFile('dtml/addCdrom',globals())
+
+
+class AIXCdrom(HWComponent):
+ """AIX CDrom object"""
+
+ portal_type = meta_type = 'Cdrom'
+
+ manage_editCdromForm = DTMLFile('dtml/manageEditCdrom',globals())
+
+ description = ""
+ hostresindex = 0
+
+ title=""
+ aixcdromtype=""
+ aixcdrominterface=""
+ aixcdromdescription=""
+ aixcdromstatus=""
+ aixcdromlocation=""
+ aixcdromManufacturerName=""
+ aixcdromModelName=""
+ aixcdromPartNumber=""
+ aixcdromFRU=""
+ aixcdromEC=""
+
+
+
+ _properties = HWComponent._properties + (
+ {'id':'description', 'type':'string', 'mode':'w'},
+ {'id':'hostresindex', 'type':'int', 'mode':'w'},
+ {'id':'title', 'type':'string', 'mode':'w'},
+ {'id':'aixcdromtype', 'type':'string', 'mode':'w'},
+ {'id':'aixcdrominterface', 'type':'string', 'mode':'w'},
+ {'id':'aixcdromdescription', 'type':'string', 'mode':'w'},
+ {'id':'aixcdromstatus', 'type':'string', 'mode':'w'},
+ {'id':'aixcdromlocation', 'type':'string', 'mode':'w'},
+ {'id':'aixcdromManufacturerName', 'type':'string', 'mode':'w'},
+ {'id':'aixcdromModelName', 'type':'string', 'mode':'w'},
+ {'id':'aixcdromPartNumber', 'type':'string', 'mode':'w'},
+ {'id':'aixcdromFRU', 'type':'string', 'mode':'w'},
+ {'id':'aixcdromEC', 'type':'string', 'mode':'w'},
+ )
+
+ _relations = HWComponent._relations + (
+ ("hw", ToOne(ToManyCont, "ZenPacks.community.AIX.AIXDeviceHW", "cdrom")),
+ )
+
+
+ factory_type_information = (
+ {
+ 'id' : 'Cdrom',
+ 'meta_type' : 'Cdrom',
+ 'description' : """Arbitrary device grouping class""",
+ 'icon' : 'HardDisk_icon.gif',
+ 'product' : 'ZenModel',
+ 'factory' : 'manage_addCdrom',
+ 'immediate_view' : 'viewCdrom',
+ 'actions' :
+ (
+ { 'id' : 'status'
+ , 'name' : 'Status'
+ , 'action' : 'viewCdrom'
+ , 'permissions' : ('View',)
+ },
+ { 'id' : 'perfConf'
+ , 'name' : 'Template'
+ , 'action' : 'objTemplates'
+ , 'permissions' : ("Change Device", )
+ },
+ { 'id' : 'viewHistory'
+ , 'name' : 'Modifications'
+ , 'action' : 'viewHistory'
+ , 'permissions' : (ZEN_VIEW_MODIFICATIONS,)
+ },
+ )
+ },
+ )
+
+ def viewName(self): return self.description
+
+
+InitializeClass(AIXCdrom)
@@ -0,0 +1,24 @@
+from Globals import InitializeClass
+from Products.ZenModel.DeviceHW import DeviceHW
+from Products.ZenModel.Hardware import Hardware
+from Products.ZenRelations.RelSchema import *
+
+class AIXDeviceHW(DeviceHW):
+
+ # Define new relationships
+ _relations = Hardware._relations + (
+ ("cpus", ToManyCont(ToOne, "Products.ZenModel.CPU", "hw")),
+ ("harddisks", ToManyCont(ToOne, "ZenPacks.community.AIX.AIXHardDisk", "hw")),
+ ("cdrom", ToManyCont(ToOne, "ZenPacks.community.AIX.AIXCdrom", "hw")),
+ ("tape", ToManyCont(ToOne, "ZenPacks.community.AIX.AIXTape", "hw")),
+ ("printer", ToManyCont(ToOne, "ZenPacks.community.AIX.AIXPrinter", "hw")),
+ ("cards", ToManyCont(ToOne, "ZenPacks.community.AIX.AIXExpansionCard", "hw")),
+ ("lparinfo", ToManyCont(ToOne, "ZenPacks.community.AIX.AIXLparInfo", "hw")),
+ ("fans", ToManyCont(ToOne, "Products.ZenModel.Fan", "hw")),
+ ("powersupplies", ToManyCont(ToOne, "Products.ZenModel.PowerSupply",
+ "hw")),
+ ("temperaturesensors", ToManyCont(ToOne,
+ "Products.ZenModel.TemperatureSensor", "hw")),
+ )
+
+InitializeClass(AIXDeviceHW)
@@ -0,0 +1,53 @@
+__doc__="""AIX ExpansionCard
+"""
+
+from Globals import InitializeClass
+
+from Products.ZenRelations.RelSchema import *
+
+from Products.ZenModel.HWComponent import HWComponent
+from Products.ZenModel.ExpansionCard import ExpansionCard
+
+from Products.ZenModel.ZenossSecurity import *
+
+class AIXExpansionCard(ExpansionCard):
+ """AIX ExpansionCard object"""
+
+ # we don't monitor cards
+ # monitor = False
+
+ #_properties = ExpansionCard._properties + (
+ # {'id':'slot', 'type':'int', 'mode':'w'},
+ #)
+
+ _relations = HWComponent._relations + (
+ ("hw", ToOne(ToManyCont, "ZenPacks.community.AIX.AIXDeviceHW", "cards")),
+ )
+
+
+ factory_type_information = (
+ {
+ 'id' : 'AIXExpansionCard',
+ 'meta_type' : 'AIXExpansionCard',
+ 'description' : """Arbitrary device grouping class""",
+ 'icon' : 'ExpansionCard_icon.gif',
+ 'product' : 'ZenModel',
+ 'factory' : 'manage_addAIXExpansionCard',
+ 'immediate_view' : 'viewAIXExpansionCard',
+ 'actions' :
+ (
+ { 'id' : 'status'
+ , 'name' : 'Status'
+ , 'action' : 'viewAIXExpansionCard'
+ , 'permissions' : ('View',)
+ },
+ { 'id' : 'viewHistory'
+ , 'name' : 'Modifications'
+ , 'action' : 'viewHistory'
+ , 'permissions' : (ZEN_VIEW_MODIFICATIONS,)
+ },
+ )
+ },
+ )
+
+InitializeClass(AIXExpansionCard)
Oops, something went wrong.

0 comments on commit 8a9aa3a

Please sign in to comment.