Package Products :: Package ZenRelations :: Module zPropertyCategory
[hide private]
[frames] | no frames]

Source Code for Module Products.ZenRelations.zPropertyCategory

  1  ########################################################################### 
  2  # 
  3  # This program is part of Zenoss Core, an open source monitoring platform. 
  4  # Copyright (C) 2011, Zenoss Inc. 
  5  # 
  6  # This program is free software; you can redistribute it and/or modify it 
  7  # under the terms of the GNU General Public License version 2 or (at your 
  8  # option) any later version as published by the Free Software Foundation. 
  9  # 
 10  # For complete information please visit: http://www.zenoss.com/oss/ 
 11  # 
 12  ########################################################################### 
 13   
 14  MAPPINGS = { 
 15  # Modeler Controls 
 16  # ---------- 
 17  'zCollectorClientTimeout': 'Modeler Controls', 
 18  'zCollectorDecoding': 'Modeler Controls', 
 19  'zCollectorPlugins': 'Modeler Controls', 
 20  'zFileSystemMapIgnoreNames': 'Modeler Controls', 
 21  'zFileSystemMapIgnoreTypes': 'Modeler Controls', 
 22  'zInterfaceMapIgnoreNames': 'Modeler Controls', 
 23  'zInterfaceMapIgnoreTypes': 'Modeler Controls', 
 24  'zIpServiceMapMaxPort': 'Modeler Controls', 
 25  'zLocalInterfaceNames': 'Modeler Controls', 
 26  'zLocalIpAddresses': 'Modeler Controls', 
 27  'zRouteMapCollectOnlyIndirect': 'Modeler Controls', 
 28  'zRouteMapCollectOnlyLocal': 'Modeler Controls', 
 29  'zRouteMapMaxRoutes': 'Modeler Controls', 
 30  'zHardDiskMapMatch': 'Modeler Controls', 
 31   
 32  # zencommand 
 33  # ---------- 
 34  'zCommandCommandTimeout': 'zencommand', 
 35  'zCommandCycleTime': 'zencommand', 
 36  'zCommandExistanceTest': 'zencommand', 
 37  'zCommandLoginTimeout': 'zencommand', 
 38  'zCommandLoginTries': 'zencommand', 
 39  'zCommandPassword': 'zencommand', 
 40  'zCommandPath': 'zencommand', 
 41  'zCommandPort': 'zencommand', 
 42  'zCommandProtocol': 'zencommand', 
 43  'zCommandSearchPath': 'zencommand', 
 44  'zCommandUsername': 'zencommand', 
 45  'zKeyPath': 'zencommand', 
 46  'zTelnetEnable': 'zencommand', 
 47  'zTelnetEnableRegex': 'zencommand', 
 48  'zTelnetLoginRegex': 'zencommand', 
 49  'zTelnetPasswordRegex': 'zencommand', 
 50  'zTelnetPromptTimeout': 'zencommand', 
 51  'zTelnetSuccessRegexList': 'zencommand', 
 52  'zTelnetTermLength': 'zencommand', 
 53   
 54  # Misc 
 55  # --------- 
 56  'zDeviceTemplates': 'Misc', 
 57  'zFileSystemSizeOffset': 'Misc', 
 58  'zIcon': 'Misc', 
 59  'zIfDescription': 'Misc', 
 60  'zLinks': 'Misc', 
 61  'zPingMonitorIgnore': 'Misc', 
 62  'zProdStateThreshold': 'Misc', 
 63  'zPythonClass': 'Misc', 
 64  'zStatusConnectTimeout': 'Misc', 
 65   
 66  # SNMP 
 67  # ---------- 
 68  'zMaxOIDPerRequest': 'SNMP', 
 69  'zSnmpEngineId': 'SNMP', 
 70  'zSnmpAuthPassword': 'SNMP', 
 71  'zSnmpAuthType': 'SNMP', 
 72  'zSnmpCollectionInterval': 'SNMP', 
 73  'zSnmpCommunities': 'SNMP', 
 74  'zSnmpCommunity': 'SNMP', 
 75  'zSnmpMonitorIgnore': 'SNMP', 
 76  'zSnmpPort': 'SNMP', 
 77  'zSnmpPrivPassword': 'SNMP', 
 78  'zSnmpPrivType': 'SNMP', 
 79  'zSnmpSecurityName': 'SNMP', 
 80  'zSnmpTimeout': 'SNMP', 
 81  'zSnmpTries': 'SNMP', 
 82  'zSnmpVer': 'SNMP', 
 83   
 84   
 85  # ZenPacks 
 86  # ======== 
 87   
 88  # CiscoMonitor 
 89  # ---------- 
 90  'zIdiomPassword': 'CiscoMonitor', 
 91  'zIdiomUsername': 'CiscoMonitor', 
 92   
 93  # RANCID 
 94  # ---------- 
 95  'zRancidGroup': 'RANCID', 
 96  'zRancidRoot': 'RANCID', 
 97  'zRancidType': 'RANCID', 
 98  'zRancidUrl': 'RANCID', 
 99   
100  # CiscoUCS 
101  # ---------- 
102  'zCiscoUCSManagerPassword': 'CiscoUCS', 
103  'zCiscoUCSManagerPort': 'CiscoUCS', 
104  'zCiscoUCSManagerUser': 'CiscoUCS', 
105  'zCiscoUCSManagerUseSSL': 'CiscoUCS', 
106   
107  # Sugar 
108  # ---------- 
109  'zSugarCRMBase': 'Sugar', 
110  'zSugarCRMPassword': 'Sugar', 
111  'zSugarCRMTestAccount': 'Sugar', 
112  'zSugarCRMUsername': 'Sugar', 
113   
114  # Dell 
115  # ---------- 
116  'zSysedgeDiskMapIgnoreNames': 'Dell', 
117   
118  # Telnet 
119  # ---------- 
120  'zTelnetEnable': 'Telnet', 
121  'zTelnetEnableRegex': 'Telnet', 
122  'zTelnetLoginRegex': 'Telnet', 
123  'zTelnetPasswordRegex': 'Telnet', 
124  'zTelnetPromptTimeout': 'Telnet', 
125  'zTelnetSuccessRegexList': 'Telnet', 
126  'zTelnetTermLength': 'Telnet', 
127   
128  # vCloud 
129  # ---------- 
130  'zVCloudPassword': 'vCloud', 
131  'zVCloudPort': 'vCloud', 
132  'zVCloudUsername': 'vCloud', 
133   
134  # VMware 
135  # ---------- 
136  'zVMwareViEndpointHost': 'VMware', 
137  'zVMwareViEndpointMonitor': 'VMware', 
138  'zVMwareViEndpointPassword': 'VMware', 
139  'zVMwareViEndpointUser': 'VMware', 
140  'zVMwareViEndpointUseSsl': 'VMware', 
141   
142  # WebSphere 
143  # ---------- 
144  'zWebsphereAuthRealm': 'WebSphere', 
145  'zWebsphereNode': 'WebSphere', 
146  'zWebspherePassword': 'WebSphere', 
147  'zWebsphereServer': 'WebSphere', 
148  'zWebsphereURLPath': 'WebSphere', 
149  'zWebsphereUser': 'WebSphere', 
150   
151  # Windows 
152  # ---------- 
153  'zWinEventlog': 'Windows', 
154  'zWinEventlogMinSeverity': 'Windows', 
155  'zWinPassword': 'Windows', 
156  'zWinPerfCycleSeconds': 'Windows', 
157  'zWinPerfCyclesPerConnection': 'Windows', 
158  'zWinPerfTimeoutSeconds': 'Windows', 
159  'zWinUser': 'Windows', 
160  'zWmiMonitorIgnore': 'Windows', 
161  } 
162   
163 -def setzPropertyCategory(prop, category):
164 """ 165 This is for display purposes only. Set the category of a zproperty. 166 This list is not persisted at all so it will need to be called 167 each time that zope starts up. 168 @type prop: String 169 @param prop: zProperty Id 170 @type category: String 171 @param category: What will show as the category for the zproperty 172 """ 173 MAPPINGS[prop] = category
174
175 -def getzPropertyCategory(prop):
176 """ 177 Uses the mapping defined in this file to 178 come up with a category for a given zproperty. 179 If none is found "Misc" is returned. 180 Note that the category IS case sensitive. 181 """ 182 if MAPPINGS.get(prop): 183 return MAPPINGS[prop] 184 # if not in this list assume they came from a zenpack 185 return "Misc"
186