1
2
3
4
5
6
7
8
9
10
11
12
13
14 from Products.DataCollector.plugins.CollectorPlugin import CollectorPlugin
15
17 """
18 A WMIPlugin defines a native Python collection routine and a parsing
19 method to turn the returned data structure into a datamap. A valid
20 WMIPlugin must implement the process method.
21 """
22 transport = "wmi"
23 deviceProperties = CollectorPlugin.deviceProperties + (
24 'zWmiMonitorIgnore',
25 'zWinUser',
26 'zWinPassword',
27 'zWinEventlogMinSeverity',
28 'zWinEventlogClause',
29 )
30
32 return not getattr(device, 'zWmiMonitorIgnore', True)
33
35 for prop in self.deviceProperties:
36 if hasattr(device, prop):
37 setattr(proxy, prop, getattr(device, prop))
38
39 setattr(proxy, 'lastChange', getattr(device, '_lastChange', ''))
40
42 raise NotImplementedError
43
45 if isinstance(results, Exception):
46 log.error(results)
47 return None
48 return results
49