1
2
3
4
5
6
7
8
9
10
11
12
13
14 __doc__ = """CommandParser
15
16 CommandParser parses the output of a command to return a datamap
17
18 $Id: CommandParser.py,v 1.1 2003/09/25 16:21:52 edahl Exp $"""
19
20 __version__ = '$Revision: 1.1 $'[11:-2]
21
22 from Products.DataCollector.ObjectMap import ObjectMap
23 from Products.DataCollector.RelationshipMap import RelationshipMap
24
25 from Products.ZenUtils.Utils import prepId as globalPrepId
26
28
29
30 command = ''
31
32 - def prepId(self, id, subchar='_'):
33 return globalPrepId(id, subchar)
34
36 return ObjectMap(className)
37
40
42 """does device meet the proper conditions for this collector to run"""
43 return 0
44
45
46 - def parse(self, results, log):
47 """collect snmp information from this device
48 device is the a Device class (or subclass) object
49 snmpsess is a valid instance of SnmpSession to connect
50 to this device"""
51 pass
52
53
55 """return a description of what this map does"""
56 pass
57