Default the resource backend to SQL
Previously, keystone had logic to default the resource backend, without providing a default through configuration. This behavior was removed and we should provide a sensible default for the resource backend. This commit defaults the resource backend to `sql` since that is the only backend keystone currently supports. We also leave a warning saying there isn't any reason to change the default unless a deployer is writing a proprietary or custom resource backend. Change-Id: Ic193eab397a0f10cdf86dec1816aec9da86f1ab8 Partial-Bug: 1630435
This commit is contained in:
parent
856bd73826
commit
d7b836e53e
@ -17,11 +17,11 @@ from keystone.conf import utils
|
|||||||
|
|
||||||
driver = cfg.StrOpt(
|
driver = cfg.StrOpt(
|
||||||
'driver',
|
'driver',
|
||||||
|
default='sql',
|
||||||
help=utils.fmt("""
|
help=utils.fmt("""
|
||||||
Entry point for the resource driver in the `keystone.resource` namespace. Only
|
Entry point for the resource driver in the `keystone.resource` namespace. Only
|
||||||
a `sql` driver is supplied by keystone. If a resource driver is not specified,
|
a `sql` driver is supplied by keystone. Unless you are writing proprietary
|
||||||
the assignment driver will choose the resource driver to maintain backwards
|
drivers for keystone, you do not need to set this option.
|
||||||
compatibility with older configuration files.
|
|
||||||
"""))
|
"""))
|
||||||
|
|
||||||
caching = cfg.BoolOpt(
|
caching = cfg.BoolOpt(
|
||||||
|
@ -53,14 +53,7 @@ class Manager(manager.Manager):
|
|||||||
_PROJECT = 'project'
|
_PROJECT = 'project'
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# If there is a specific driver specified for resource, then use it.
|
|
||||||
# Otherwise retrieve the driver type from the assignment driver.
|
|
||||||
resource_driver = CONF.resource.driver
|
resource_driver = CONF.resource.driver
|
||||||
|
|
||||||
if resource_driver is None:
|
|
||||||
assignment_manager = dependency.get_provider('assignment_api')
|
|
||||||
resource_driver = assignment_manager.default_resource_driver()
|
|
||||||
|
|
||||||
super(Manager, self).__init__(resource_driver)
|
super(Manager, self).__init__(resource_driver)
|
||||||
|
|
||||||
# Make sure it is a driver version we support, and if it is a legacy
|
# Make sure it is a driver version we support, and if it is a legacy
|
||||||
|
Loading…
Reference in New Issue
Block a user