Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(43)  |  Call(36)  |  Derive(0)  |  Import(7)

src/m/i/milkcheck-HEAD/lib/MilkCheck/UI/Cli.py   milkcheck(Download)
from MilkCheck.Engine.Action import Action, action_manager_self
from MilkCheck.Engine.Service import Service
from MilkCheck.ServiceManager import service_manager_self
from MilkCheck.Config.ConfigParser import ConfigParser, ConfigParserError
from MilkCheck.Config.Configuration import ConfigurationError
            action_manager_self().dryrun = self._conf['dryrun']
 
            manager = service_manager_self()
            # Case 0: build the graph
            if self._conf.get('graph', False):

src/m/i/milkcheck-HEAD/lib/MilkCheck/Config/Configuration.py   milkcheck(Download)
from ClusterShell.NodeSet import NodeSet
 
from MilkCheck.ServiceManager import service_manager_self
from MilkCheck.Engine.BaseEntity import UnknownDependencyError
from MilkCheck.Engine.Service import Service
        '''
        # Get back the manager
        manager = service_manager_self()
        dependencies = {}
 

src/m/i/milkcheck-HEAD/lib/MilkCheck/Engine/BaseEntity.py   milkcheck(Download)
        If it cannot solve the variable name, it raises UndefinedVariableError.
        '''
        from MilkCheck.ServiceManager import service_manager_self
 
        if varname in self.variables:

src/m/i/milkcheck-HEAD/tests/MilkCheckTests/ServiceManagerTest.py   milkcheck(Download)
from MilkCheck.Engine.Service import Service
from MilkCheck.Engine.ServiceGroup import ServiceGroup
from MilkCheck.ServiceManager import ServiceManager, service_manager_self
from MilkCheck.ServiceManager import ServiceAlreadyReferencedError
from MilkCheck.ServiceManager import ServiceNotFoundError
    def test_instanciation(self):
        '''Test the instanciation of the singleton class ServiceManager'''
        manager = service_manager_self()
        same_manager = service_manager_self()
        self.assertTrue(manager is same_manager)
 
    def test_service_registration(self):
        '''Test the resgistration of a service within the manager'''
        manager = service_manager_self()
    def test_forget_service(self):
        '''The how the manager forgets a service properly'''
        manager = service_manager_self()
        s1 = Service('S1')
        s2 = Service('S2')

src/m/i/milkcheck-HEAD/tests/MilkCheckTests/UITests/CliTest.py   milkcheck(Download)
from MilkCheck.UI.Cli import CommandLine, ConsoleDisplay, MAXTERMWIDTH
import MilkCheck.ServiceManager
from MilkCheck.ServiceManager import ServiceManager, service_manager_self
from MilkCheck.Engine.Service import Service
from MilkCheck.Engine.Action import Action, ActionManager
 
        ServiceManager._instance = None 
        self.manager = service_manager_self()
        ActionManager._instance = None
 
    def test_execute_unknown_exception(self):
        """CLI return '12' if an unknown exception is raised."""
        service_manager_self().call_services = None
        self._output_check(['S2', 'start'], RC_UNKNOWN_EXCEPTION, "",
"""[00:00:00] ERROR    - Unexpected Exception : 'NoneType'"""\
    def tearDown(self):
        '''Restore ServiceManager'''
        CLICommon.tearDown(self)
        service_manager_self().call_services = self.call_services_backup
 
    def test_KeyboardInterrupt_output(self):
        '''Test command line output on KeybordInterrupt'''
        service_manager_self().call_services = \

src/m/i/milkcheck-HEAD/tests/MilkCheckTests/EngineTests/BaseEntityTest.py   milkcheck(Download)
from MilkCheck.Engine.BaseEntity import BaseEntity, Dependency
from MilkCheck.Engine.ServiceGroup import ServiceGroup
from MilkCheck.ServiceManager import service_manager_self
 
# Symbols

src/m/i/milkcheck-HEAD/tests/MilkCheckTests/ConfigTests/MilkCheckConfigTest.py   milkcheck(Download)
from MilkCheck.Config.Configuration import MilkCheckConfig, ConfigurationError
from MilkCheck.Config.Configuration import UnknownDependencyError
from MilkCheck.ServiceManager import service_manager_self
 
import socket
        self.cfg._build_services()
        # Get back the manager
        manager = service_manager_self()
        self.assertTrue('S1' in manager.entities)
        self.assertTrue('S2' in manager.entities)
        self.cfg.build_graph()
        # Get back the manager
        manager = service_manager_self()
        self.assertTrue('foo1' in manager.entities)
        self.assertTrue('foo2' in manager.entities)
        self.cfg.build_graph()
        # Get back the manager
        manager = service_manager_self()
        self.assertTrue('compat' in manager.entities)
        self.assertTrue('foo1' in manager.entities)
                cmd: run_bar''')
        self.cfg.build_graph()
        manager = service_manager_self()
        self.assertTrue('foo' in manager.entities)
        self.assertTrue('bar' in manager.entities)