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