1
2
3
4
5
6
7
8
9
10
11 __doc__ = """BaseClient
12 Base class for the client interface for data collection
13 """
14
16 """
17 Define the DataCollector Client interface
18 """
19
20 - def __init__(self, device, datacollector):
21 """
22 Initializer
23
24 @param device: remote device to use the datacollector
25 @type device: device object
26 @param datacollector: performance data collector object
27 @type datacollector: datacollector object
28 """
29 self.hostname = None
30 if device:
31 self.hostname = device.id
32 self.device = device
33 self.datacollector = datacollector
34 self.timeout = None
35 self.timedOut = False
36
38 """
39 Start the data gathering.
40 To be implemented by child classes
41 """
42 pass
43
45 """
46 Stopping condition for the collector.
47 To be implemented by child classes
48 """
49 pass
50
52 """
53 Return the results of the data collection.
54 To be implemented by child classes
55
56 @return: list of results
57 @rtype: list of results
58 """
59 return []
60