keystone.common.config is 1200+ lines of super dense, merge-conflict
prone, difficult to navigate, and finicky to maintain code. Let's follow
nova's lead and break it down into more manageable modules.
This patch creates a new Python package, keystone.conf, and moves all of
our configuration options into it, mirroring nova's nova.conf package.
There are a couple special modules in keystone.conf introduced here as
- keystone.conf.__init__: This causes all of Keystone options to be
registered on import, so consumers of keystone.conf don't have
races with config initialization code while trying to use
oslo_config.cfg.CONF directly (keystone.conf replaces all uses for
oslo_config.cfg.CONF in keystone).
- keystone.conf.base: Keystone's [DEFAULT] group options. I'd prefer
this to be called 'default.py', but I'm just copying nova's lead here.
- keystone.conf.opts: The entry point for oslo.config itself.
- keystone.conf.constants: There are a few constants (deprecation
messages, default paths, etc) that are used by multiple configuration
modules, so they need to live in a common place.
This patch moves the assignment abstract base class out of core and into
This removes dependencies where backend code references code in the
core. The reasoning being that the core should know about the backend
interface, but the backends should not know anything about the core
(separation of concerns). And part of the risk here is a potential for
Currently tox ignores D401 (401: First line should be in imperative mood).
This change removes it and make keystoneauth docstring compliantwith it.
EngineFacade is deprecated. This partially switches keystone to
use oslo.db.sqlalchemy.enginefacade. 'get_session' and 'get_engine'
methods are still used in sql migrations and related tests.
In preparation for removing a series of driver methods in
the rationalization of assignment in follow-on patches, we
first create a V9 version of the driver interface. In this
patch, both V8 and V9 are identical.
To create the new V9 driver we:
1) Copy the sql V8 driver into its own directory to provide a
test for support of a legacy driver
2) Increase the version of the (new) standard driver to V9
3) Create a wrapper for V8 legacy drivers, so that the latest
manager can be driver version-less
4) Create tests that run the standard sql Identity tests
against the V8 driver to show, going forward, it is still working.
Since our existing test strategy assumes that we never change the
sqlalchemy models during a test run, this turned out to be slight
more complex than anticipated - so a new tox envlist target for legacy
drivers is added.
Partially Implements: blueprint assignment-manager-cleanup