Trees | Indices | Help |
|
---|
|
1 ########################################################################### 2 # 3 # This program is part of Zenoss Core, an open source monitoring platform. 4 # Copyright (C) 2007, 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 as published by 8 # the Free Software Foundation. 9 # 10 # For complete information please visit: http://www.zenoss.com/oss/ 11 # 12 ########################################################################### 13 14 __doc__="""Monitor 15 16 Base class for all Monitor or Monitor Configuration Classes. This is 17 an abstract class that is used for the devices to monitors 18 relationship which says which monitors monitor which devices. 19 20 $Id: Monitor.py,v 1.5 2004/04/14 22:11:48 edahl Exp $""" 21 22 __version__ = "$Revision: 1.5 $"[11:-2] 23 24 from Globals import InitializeClass 25 26 from ZenModelRM import ZenModelRM 27 from DeviceManagerBase import DeviceManagerBase 2830 meta_type = 'Monitor' 31 3589 90 91 InitializeClass(Monitor) 9237 """see IManageDevice""" 38 mroot = self.getDmdRoot("Monitors")._getOb(self.monitorRootName) 39 return filter(lambda x: x != self.id, mroot.objectIds())40 4143 """see IManageDevice""" 44 mroot = self.getDmdRoot("Monitors")._getOb(self.monitorRootName) 45 return mroot._getOb(moveTargetName)46 47 5153 """ Provide a method to set status monitors from any organizer """ 54 if not statusMonitors: 55 if REQUEST: REQUEST['message'] = "No Monitor Selected" 56 return self.callZenScreen(REQUEST) 57 if deviceNames is None: 58 if REQUEST: REQUEST['message'] = "No Devices Selected" 59 return self.callZenScreen(REQUEST) 60 for devname in deviceNames: 61 dev = self.devices._getOb(devname) 62 dev.setStatusMonitors(statusMonitors) 63 if REQUEST: 64 REQUEST['message'] = "Status monitor set to %s" % ( 65 statusMonitors) 66 if REQUEST.has_key('oneKeyValueSoInstanceIsntEmptyAndEvalToFalse'): 67 return REQUEST['message'] 68 else: 69 return self.callZenScreen(REQUEST)7072 """ Provide a method to set performance monitor from any organizer """ 73 if not performanceMonitor: 74 if REQUEST: REQUEST['message'] = "No Monitor Selected" 75 return self.callZenScreen(REQUEST) 76 if deviceNames is None: 77 if REQUEST: REQUEST['message'] = "No Devices Selected" 78 return self.callZenScreen(REQUEST) 79 for devname in deviceNames: 80 dev = self.devices._getOb(devname) 81 dev.setPerformanceMonitor(performanceMonitor) 82 if REQUEST: 83 REQUEST['message'] = "Performance monitor set to %s" % ( 84 performanceMonitor) 85 if REQUEST.has_key('oneKeyValueSoInstanceIsntEmptyAndEvalToFalse'): 86 return REQUEST['message'] 87 else: 88 return self.callZenScreen(REQUEST)
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Thu Oct 25 16:28:25 2007 | http://epydoc.sourceforge.net |