def prepare_service(argv=None): """Sets global config from config file and sets up logging.""" argv = argv or [] config.init(argv[1:]) log.set_defaults() config.setup_logging(cfg.CONF) rpc.init()
def get_no_context_enforcer(): # oslo.config needs access to the --config-dir and --config-file # command line args filtered_args = ['--config-dir', '--config-file'] # Start at 1 because cfg.CONF expects the equivalent of sys.argv[1:] conf_args = [arg for idx, arg in enumerate(sys.argv[1:]) if (arg in filtered_args or sys.argv[idx] in filtered_args)] config.init(conf_args) return Policy()
def prepare_service(argv=None): """Sets global config from config file and sets up logging.""" argv = argv or [] config.init(argv[1:]) LOG.info(_LI('Starting Octavia API server')) cfg.set_defaults(log.log_opts, default_log_levels=['amqp=WARN', 'amqplib=WARN', 'qpid.messaging=INFO', 'sqlalchemy=WARN', 'keystoneclient=INFO', 'stevedore=INFO', 'eventlet.wsgi.server=WARN', 'iso8601=WARN', 'paramiko=WARN', 'requests=WARN', 'ironic.openstack.common=WARN', ]) config.setup_logging(cfg.CONF)
def get_no_context_enforcer(): config.init([]) return Policy()
def test_sanity(self): config.init([]) config.setup_logging(cfg.CONF) # Resetting because this will cause inconsistent errors when run with # other tests self.addCleanup(cfg.CONF.reset)
def prepare_service(argv=None): """Sets global config from config file and sets up logging.""" argv = argv or [] config.init(argv[1:]) log.set_defaults() config.setup_logging(cfg.CONF)
def test_sanity(self): config.init([]) config.setup_logging(cfg.CONF)