def testTrimmedAliasId(self):
        alias = RRDDataPointAlias(' alias1')
        self.assert_(alias.id == 'alias1')
        alias = RRDDataPointAlias('alias1 ')
        self.assert_(alias.id == 'alias1')
        alias = RRDDataPointAlias(' alias1 ')
        self.assert_(alias.id == 'alias1')

        t = createTemplate(self.dmd)
        ds0 = t.datasources()[0]
        dp0 = ds0.datapoints()[0]
        alias1 = manage_addDataPointAlias(dp0, ' alias1', '')
        self.assert_(alias1.id == 'alias1')
        alias2 = manage_addDataPointAlias(dp0, 'alias2 ', '')
        self.assert_(alias2.id == 'alias2')
        alias3 = manage_addDataPointAlias(dp0, ' alias3 ', '')
        self.assert_(alias3.id == 'alias3')
    def testTrimmedAliasId(self):
        alias = RRDDataPointAlias(' alias1')
        self.assert_(alias.id == 'alias1')
        alias = RRDDataPointAlias('alias1 ')
        self.assert_(alias.id == 'alias1')
        alias = RRDDataPointAlias(' alias1 ')
        self.assert_(alias.id == 'alias1')

        t = createTemplate(self.dmd)
        ds0 = t.datasources()[0]
        dp0 = ds0.datapoints()[0]
        alias1 = manage_addDataPointAlias(dp0, ' alias1', '')
        self.assert_(alias1.id == 'alias1')
        alias2 = manage_addDataPointAlias(dp0, 'alias2 ', '')
        self.assert_(alias2.id == 'alias2')
        alias3 = manage_addDataPointAlias(dp0, ' alias3 ', '')
        self.assert_(alias3.id == 'alias3')
Exemple #3
0
 def manage_addDataPointAlias(self, id, formula, REQUEST=None ):
     """
     Add an alias to this datapoint
     """
     alias = manage_addDataPointAlias( self, id, formula )
     if REQUEST:
         return self.callZenScreen(REQUEST)
     return alias
Exemple #4
0
 def manage_addDataPointAlias(self, id, formula, REQUEST=None):
     """
     Add an alias to this datapoint
     """
     alias = manage_addDataPointAlias(self, id, formula)
     if REQUEST:
         return self.callZenScreen(REQUEST)
     return alias
 def testCreateByMethod(self):
     aliasName = 'testalias3'
     aliasFormula = 'testformula2'
     t = createTemplate(self.dmd)
     ds0 = t.datasources()[0]
     dp0 = ds0.datapoints()[0]
     alias = manage_addDataPointAlias(dp0, aliasName, aliasFormula)
     self.assert_(alias.id == aliasName)
     self.assert_(alias.formula == aliasFormula)
 def testCreateByMethod(self):
     aliasName = 'testalias3'
     aliasFormula = 'testformula2'
     t = createTemplate(self.dmd)
     ds0 = t.datasources()[0]
     dp0 = ds0.datapoints()[0]
     alias = manage_addDataPointAlias(dp0, aliasName, aliasFormula)
     self.assert_(alias.id == aliasName)
     self.assert_(alias.formula == aliasFormula)
Exemple #7
0
 def addAlias(self, id, formula=None):
     """
     Add a new alias to this datapoint
     """
     manage_addDataPointAlias( self, id, formula )
Exemple #8
0
 def addAlias(self, id, formula=None):
     """
     Add a new alias to this datapoint
     """
     manage_addDataPointAlias(self, id, formula)