def main(): CONF.register_cli_opt(category_opt) try: utils.read_config('designate', sys.argv) logging.setup(CONF, 'designate') except cfg.ConfigFilesNotFoundError: cfgfile = CONF.config_file[-1] if CONF.config_file else None if cfgfile and not os.access(cfgfile, os.R_OK): st = os.stat(cfgfile) print(_("Could not read %s. Re-running with sudo") % cfgfile) try: os.execvp('sudo', ['sudo', '-u', '#%s' % st.st_uid] + sys.argv) except Exception: print(_('sudo failed, continuing as if nothing happened')) print(_('Please re-run designate-manage as root.')) sys.exit(2) utils.setup_gmr(log_dir=cfg.CONF.log_dir) hookpoints.log_hook_setup() fn = CONF.category.action_fn fn_args = fetch_func_args(fn) fn(*fn_args)
def main(): utils.read_config('designate', sys.argv) logging.setup(CONF, 'designate') utils.setup_gmr(log_dir=cfg.CONF.log_dir) server = mdns_service.Service() service.serve(server, workers=CONF['service:mdns'].workers) service.wait()
def main(): utils.read_config('designate', sys.argv) logging.setup(CONF, 'designate') utils.setup_gmr(log_dir=cfg.CONF.log_dir) server = central.Service(threads=CONF['service:central'].threads) service.serve(server, workers=CONF['service:central'].workers) service.wait()
def main(): utils.read_config('designate', sys.argv) logging.setup(CONF, 'designate') utils.setup_gmr(log_dir=cfg.CONF.log_dir) server = agent_service.Service(threads=CONF['service:agent'].threads) service.serve(server, workers=CONF['service:agent'].workers) service.wait()
def main(): utils.read_config('designate', sys.argv) logging.setup(CONF, 'designate') utils.setup_gmr(log_dir=cfg.CONF.log_dir) server = api_service.Service(threads=CONF['service:api'].threads) launcher = service.launch(server, CONF['service:api'].workers) launcher.wait()
def main(): utils.read_config('designate', sys.argv) logging.setup(CONF, 'designate') utils.setup_gmr(log_dir=cfg.CONF.log_dir) hookpoints.log_hook_setup() server = central.Service(threads=CONF['service:central'].threads) service.serve(server, workers=CONF['service:central'].workers) service.wait()
def main(): utils.read_config('designate', sys.argv) logging.setup(CONF, 'designate') utils.setup_gmr(log_dir=cfg.CONF.log_dir) hookpoints.log_hook_setup() server = sink_service.Service(threads=CONF['service:sink'].threads) service.serve(server, workers=CONF['service:sink'].workers) service.wait()