Esempio n. 1
0
 def checkServiceCall(self, context, service_name):
     if 'rebootSystem' == service_name \
     and context.isComponentContext() \
     and 'config' == context.component.name:
         # config component doesn't need a lock to reboot the system
         return
     AbstractNuConfComponent.checkServiceCall(self, context, service_name)
Esempio n. 2
0
    def checkServiceCall(self, context, service_name):
        """Allow each component to call their reload, restart, start and stop services"""
        if (context.isComponentContext() and context.ownerString() == self.NAME
          and service_name in ['reload', 'restart', 'start', 'status', 'stop']):
            return

        AbstractNuConfComponent.checkServiceCall(self, context, service_name)
Esempio n. 3
0
 def checkServiceCall(self, context, service_name):
     if 'sendMailToAdmin' == service_name:
         # lock is not needed when sending an email
         return
     return AbstractNuConfComponent.checkServiceCall(self, context, service_name)