示例#1
0
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()
示例#2
0
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()
示例#3
0
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)
示例#4
0
def get_no_context_enforcer():
    config.init([])
    return Policy()
示例#5
0
 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)
示例#6
0
文件: policy.py 项目: zwyw610/octavia
def get_no_context_enforcer():
    config.init([])
    return Policy()
示例#7
0
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)
示例#8
0
 def test_sanity(self):
     config.init([])
     config.setup_logging(cfg.CONF)
示例#9
0
 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)
示例#10
0
 def test_sanity(self):
     config.init([])
     config.setup_logging(cfg.CONF)