**** CubicPower OpenStack Study ****
def setup_authentication(conf=None):
# register any non-default auth methods here (used by extensions, etc)
if conf is None:
conf = CONF
for method_name in conf.auth.methods:
if method_name not in _DEFAULT_AUTH_METHODS:
conf.register_opt(cfg.StrOpt(method_name), group='auth')
**** CubicPower OpenStack Study ****
def configure(conf=None):
if conf is None:
conf = CONF
conf.register_cli_opt(
cfg.BoolOpt('standard-threads', default=False,
help='Do not monkey-patch threading system modules.'))
conf.register_cli_opt(
cfg.StrOpt('pydev-debug-host', default=None,
help='Host to connect to for remote debugger.'))
conf.register_cli_opt(
cfg.IntOpt('pydev-debug-port', default=None,
help='Port to connect to for remote debugger.'))
for section in FILE_OPTIONS:
for option in FILE_OPTIONS[section]:
if section:
conf.register_opt(option, group=section)
else:
conf.register_opt(option)
# register any non-default auth methods here (used by extensions, etc)
setup_authentication(conf)
**** CubicPower OpenStack Study ****
def list_opts():
"""Return a list of oslo.config options available in Keystone.
The returned list includes all oslo.config options which are registered as
the "FILE_OPTIONS" in keystone.common.config. This list will not include
the options from the oslo-incubator library or any options registered
dynamically at run time.
Each object in the list is a two element tuple. The first element of
each tuple is the name of the group under which the list of options in the
second element will be registered. A group name of None corresponds to the
[DEFAULT] group in config files.
This function is also discoverable via the 'oslo.config.opts' entry point
under the 'keystone.config.opts' namespace.
The purpose of this is to allow tools like the Oslo sample config file
generator to discover the options exposed to users by this library.
:returns: a list of (group_name, opts) tuples
"""
return FILE_OPTIONS.items()