def daemon(): args = parse_args(sys.argv[1:]) config = get_config("slave.yaml", path=args.config) auth_method = get_auth_method(args, config) proxy = get_proxy(config, auth_method) from debile.slave.daemon import main main(args, config, proxy)
def main(): args = list(sys.argv[1:]) command = args.pop(0) try: run = COMMANDS[command] except KeyError: return _help() config = get_config("user.yaml") proxy = get_proxy(config, config.get('auth_method', 'ssl')) return run(proxy, *args)
def main(): args = list(sys.argv[1:]) command = args.pop(0) try: run = COMMANDS[command] except KeyError: return _help() config = get_config("user.yaml") proxy = get_proxy(config) return run(proxy, *args)
def daemon(): from argparse import ArgumentParser parser = ArgumentParser(description="Debile build slave") parser.add_argument("--config", action="store", dest="config", default=None, help="Path to the slave.yaml config file.") parser.add_argument("-s", "--syslog", action="store_true", dest="syslog", help="Log to syslog instead of stderr.") parser.add_argument("-d", "--debug", action="store_true", dest="debug", help="Enable debug messages to stderr.") args = parser.parse_args() config = get_config("slave.yaml", path=args.config) proxy = get_proxy(config) from debile.slave.daemon import main main(args, config, proxy)
def main(): args = list(sys.argv[1:]) command = args.pop(0) try: run = COMMANDS[command] except KeyError: return _help() config = get_config("user.yaml") xml = config.get('xmlrpc') auth_method = 'ssl' if xml is not None: auth_method = xml.get('auth_method', 'ssl') proxy = get_proxy(config, auth_method) return run(proxy, *args)
def daemon(): from argparse import ArgumentParser parser = ArgumentParser(description="Debile build slave") parser.add_argument("--config", action="store", dest="config", default=None, help="Path to the slave.yaml config file.") parser.add_argument("-s", "--syslog", action="store_true", dest="syslog", help="Log to syslog instead of stderr.") parser.add_argument("-d", "--debug", action="store_true", dest="debug", help="Enable debug messages to stderr.") parser.add_argument("--auth", action="store", dest="auth_method", default='ssl', help="Authentication method ('ssl' or 'simple')") args = parser.parse_args() config = get_config("slave.yaml", path=args.config) proxy = get_proxy(config, args.auth_method) from debile.slave.daemon import main main(args, config, proxy)
def _init_config(path): config.update(get_config(name="master.yaml", path=path)) return config
def test_get_config_passing_path(self): file_content = config_utils.get_config('config.yaml', self.config) self.assertEqual(file_content['A'], 'a')
def test_get_config(self): file_content = config_utils.get_config('config.yaml') self.assertEqual(file_content['A'], 'a')