Allow oslo.db config options on the CLI
This commit changes how the oslo.db options are registered so that they can be specified on the CLI interface.
This commit is contained in:
@@ -47,8 +47,10 @@ _DEFAULT_SQL_CONNECTION = 'sqlite:///' + state_path_def('subunit2sql.sqlite')
|
||||
|
||||
|
||||
def parse_args(argv, default_config_files=None):
|
||||
options.set_defaults(CONF, connection=_DEFAULT_SQL_CONNECTION,
|
||||
sqlite_db='subunit2sql.sqlite')
|
||||
cfg.CONF.register_cli_opts(options.database_opts, group='database')
|
||||
cfg.CONF.set_default('connection', _DEFAULT_SQL_CONNECTION,
|
||||
group='database')
|
||||
cfg.CONF.set_default('sqlite_db', 'subunit2sql.sqlite', group='database')
|
||||
cfg.CONF(argv[1:], project='subunit2sql',
|
||||
default_config_files=default_config_files)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user