Package Products :: Package DataCollector :: Module DeviceProxy
[hide private]
[frames] | no frames]

Source Code for Module Products.DataCollector.DeviceProxy

 1  ############################################################################## 
 2  #  
 3  # Copyright (C) Zenoss, Inc. 2008, all rights reserved. 
 4  #  
 5  # This content is made available according to terms specified in 
 6  # License.zenoss under the directory where your Zenoss product is installed. 
 7  #  
 8  ############################################################################## 
 9   
10   
11  __doc__ = """DeviceProxy 
12  Memoxing object for SNMP-collecting devices 
13  """ 
14   
15  from twisted.spread import pb 
16 -class DeviceProxy(pb.Copyable, pb.RemoteCopy):
17 """ 18 Provide a cache of configuration information as needed by plugins 19 while running 20 """ 21
22 - def __init__(self):
23 """ 24 Do not use base classes intializers 25 """ 26 pass
27 28
29 - def getSnmpLastCollection(self):
30 """ 31 Return the time of the last collection time 32 33 @return: time of the last collection 34 @rtype: Python DateTime object 35 """ 36 from DateTime import DateTime 37 return DateTime(float(self._snmpLastCollection))
38 39
40 - def getSnmpStatus(self):
41 """ 42 Numeric status of our SNMP collection 43 44 @return: status 45 @rtype: number 46 """ 47 return getattr(self, '_snmpStatus', 0)
48 getSnmpStatusNumber = getSnmpStatus 49 50
51 - def getId(self):
52 """ 53 Return our id 54 55 @return: identification 56 @rtype: string 57 """ 58 return self.id
59 60 pb.setUnjellyableForClass(DeviceProxy, DeviceProxy) 61