示例#1
0
 def list_services(self):
     """Return all configured services."""
     result = []
     for service in self.services.values():
         if (service.get_enabled()):
             result.append(service.get_name())
     return result
示例#2
0
 def add_service(self, service):
     """Add service to the list of services."""
     self.services[service.get_name()] = service
示例#3
0
 def list_all_services(self):
     """Return all configured services, even if disabled"""
     result = []
     for service in self.services.values():
         result.append(service.get_name())
     return result