Exemple #1
0
def main(argv=None, config_files=None):
    CONF.register_cli_opt(command_opt)

    config.configure()
    sql.initialize()
    config.set_default_for_default_log_levels()

    CONF(args=argv[1:],
         project='keystone',
         version=pbr.version.VersionInfo('keystone').version_string(),
         usage='%(prog)s [' + '|'.join([cmd.name for cmd in CMDS]) + ']',
         default_config_files=config_files)
    config.setup_logging()
    CONF.command.cmd_class.main()
Exemple #2
0
def main(argv=None, config_files=None):
    CONF.register_cli_opt(command_opt)

    config.configure()
    sql.initialize()
    config.set_default_for_default_log_levels()

    CONF(args=argv[1:],
         project='keystone',
         version=pbr.version.VersionInfo('keystone').version_string(),
         usage='%(prog)s [' + '|'.join([cmd.name for cmd in CMDS]) + ']',
         default_config_files=config_files)
    config.setup_logging()
    CONF.command.cmd_class.main()
Exemple #3
0
def configure(version=None, config_files=None,
              pre_setup_logging_fn=lambda: None):
    config.configure()
    sql.initialize()
    config.set_config_defaults()

    CONF(project='keystone', version=version,
         default_config_files=config_files)

    pre_setup_logging_fn()
    config.setup_logging()

    if CONF.insecure_debug:
        LOG.warning(_LW(
            'insecure_debug is enabled so responses may include sensitive '
            'information.'))
Exemple #4
0
def configure(version=None,
              config_files=None,
              pre_setup_logging_fn=lambda: None):
    config.configure()
    sql.initialize()
    config.set_default_for_default_log_levels()

    CONF(project='keystone',
         version=version,
         default_config_files=config_files)

    pre_setup_logging_fn()
    config.setup_logging()

    if CONF.debug:
        LOG.warn(
            _LW('debug is enabled so responses may include sensitive '
                'information.'))
Exemple #5
0
from keystone import auth
from keystone.common import config
from keystone.common import dependency
from keystone.common.kvs import core as kvs_core
from keystone.common import request
from keystone.common import sql
from keystone import exception
from keystone.identity.backends.ldap import common as ks_ldap
from keystone import notifications
from keystone.server import common
from keystone.tests.unit import ksfixtures
from keystone.version import controllers
from keystone.version import service


config.configure()
config.set_config_defaults()

PID = six.text_type(os.getpid())
TESTSDIR = os.path.dirname(os.path.abspath(__file__))
TESTCONF = os.path.join(TESTSDIR, 'config_files')
ROOTDIR = os.path.normpath(os.path.join(TESTSDIR, '..', '..', '..'))
VENDOR = os.path.join(ROOTDIR, 'vendor')
ETCDIR = os.path.join(ROOTDIR, 'etc')


def _calc_tmpdir():
    env_val = os.environ.get('KEYSTONE_TEST_TEMP_DIR')
    if not env_val:
        return os.path.join(TESTSDIR, 'tmp', PID)
    return os.path.join(env_val, PID)
Exemple #6
0
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""Wrapper for keystone.common.config that configures itself on import."""

import os

from keystone.common import config
from keystone import exception

config.configure()
CONF = config.CONF

setup_logging = config.setup_logging
setup_authentication = config.setup_authentication
configure = config.configure


def find_paste_config():
    """Find Keystone's paste.deploy configuration file.

    Keystone's paste.deploy configuration file is specified in the
    ``[paste_deploy]`` section of the main Keystone configuration file,
    ``keystone.conf``.

    For example::
Exemple #7
0
def keystone_config():
    from keystone.common import config

    config.configure()
Exemple #8
0
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from keystone.common import config as keystone_config
from oslo_config import cfg
from oslo_log import log

# NOTE(dstanek): This is oslo's world. I just live in it.
log.register_options(cfg.CONF)
keystone_config.configure(cfg.CONF)
cfg.CONF(args=[],
         project='capstone',
         default_config_files=['etc/capstone.conf.example'])
Exemple #9
0
def keystone_config():
    from keystone.common import config

    config.configure()