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 import re
23
24 from Products.DataCollector.ObjectMap import ObjectMap
25 from Products.DataCollector.RelationshipMap import RelationshipMap
26
27 from Products.ZenUtils.Utils import prepId as globalPrepId
28
30
31
32 command = ''
33
34 - def prepId(self, id, subchar='_'):
35 return globalPrepId(id, subchar)
36
38 return ObjectMap(className)
39
42
44 """does device meet the proper conditions for this collector to run"""
45 return 0
46
47
48 - def parse(self, results, log):
49 """collect snmp information from this device
50 device is the a Device class (or subclass) object
51 snmpsess is a valid instance of SnmpSession to connect
52 to this device"""
53 pass
54
55
57 """return a description of what this map does"""
58 pass
59