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