Esempio n. 1
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.'))
Esempio n. 2
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.'))
Esempio n. 3
0
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)
Esempio n. 4
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 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)