1
2
3
4
5
6
7
8
9
10
11
12
13
14 __doc__="""CdefGraphPoint
15
16 Handles GraphPoints that define an rrd CDEF
17 """
18
19 import os
20 from GraphPoint import GraphPoint
21 from Globals import InitializeClass
22
23
32
33
35
36 meta_type = 'CdefGraphPoint'
37
38 rpn = ''
39
40 _properties = GraphPoint._properties + (
41 {'id':'rpn', 'type':'string', 'mode':'w'},
42 )
43
46
47
50
51
52 - def getGraphCmds(self, cmds, context, rrdDir, addSummary, idx,
53 multiid=-1, prefix=''):
54 ''' Build the graphing commands for this graphpoint
55 '''
56 if not self.rpn:
57 return cmds
58 return cmds + ['CDEF:%s=%s' % (
59 self.getDsName(self.id, multiid, prefix), self.rpn)]
60
61
62 InitializeClass(CdefGraphPoint)
63