Exemple #1
0
def upgradeStep(_context, title, profile, handler, description=None, source='*',
                destination='*', sortkey=0, checker=None):
    step = UpgradeStep(title, profile, source, destination, description, handler,
                       checker, sortkey)
    _context.action(
        discriminator=('upgradeStep', source, destination, handler, sortkey),
        callable=_registerUpgradeStep,
        args=(step,),
        )
Exemple #2
0
 def upgradeStep(self, _context, title, handler,
                 description=None, checker=None):
     """ nested upgradeStep directive """
     step = UpgradeStep(title, self.profile, self.source, self.dest,
                        description, handler, checker, self.sortkey)
     if self.id is None:
         self.id = str(abs(hash('%s%s%s%s' % (title, self.source, self.dest,
                                              self.sortkey))))
     _context.action(
         discriminator=('upgradeStep', self.source, self.dest, handler,
                        self.sortkey),
         callable=_registerNestedUpgradeStep,
         args=(step, self.id),
         )