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