Trees | Indices | Help |
|
---|
|
1 ########################################################################### 2 # 3 # This program is part of Zenoss Core, an open source monitoring platform. 4 # Copyright (C) 2010, 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 __doc__ = """PingDataSource.py 15 16 Defines datasource for zenping 17 """ 18 19 from Globals import InitializeClass 20 from AccessControl import ClassSecurityInfo, Permissions 21 import Products.ZenModel.RRDDataSource as RRDDataSource 22 2325 26 PING = 'PING' 27 28 sourcetypes = (PING,) 29 sourcetype = PING 30 31 timeout = 2 32 eventClass = '/Status/Ping' 33 34 cycleTime = 60 35 sampleSize = 1 36 attempts = 2 37 38 _properties = RRDDataSource.RRDDataSource._properties + ( 39 {'id':'cycleTime', 'type':'int', 'mode':'w'}, 40 {'id':'sampleSize', 'type':'int', 'mode':'w'}, 41 {'id':'attempts', 'type':'int', 'mode':'w'}, 42 ) 43 44 security = ClassSecurityInfo() 45 4870 71 InitializeClass(PingDataSource) 7250 if self.sourcetype == self.PING: 51 return "Ping " 52 return RRDDataSource.RRDDataSource.getDescription(self)53 56 6062 '''validation, etc''' 63 if REQUEST: 64 # ensure default datapoint didn't go away 65 self.addDataPoints() 66 # and eventClass 67 if not REQUEST.form.get('eventClass', None): 68 REQUEST.form['eventClass'] = self.__class__.eventClass 69 return RRDDataSource.RRDDataSource.zmanage_editProperties(self, REQUEST)
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1.1812 on Tue Oct 11 12:51:40 2011 | http://epydoc.sourceforge.net |