Support generating config automatically
Change-Id: I245cd34d595293556b7c9b006ea912d0ad562e95
This commit is contained in:
parent
9024534306
commit
678f69b479
@ -98,6 +98,15 @@ CONF.register_opts(COLLECTOR_OPTS, group=COLLECTOR_GROUP)
|
||||
CONF.register_opts(RATER_OPTS, group=RATER_GROUP)
|
||||
|
||||
|
||||
def list_opts():
|
||||
return [
|
||||
(ODOO_GROUP, ODOO_OPTS),
|
||||
(COLLECTOR_GROUP, COLLECTOR_OPTS),
|
||||
(RATER_GROUP, RATER_OPTS),
|
||||
(None, DEFAULT_OPTIONS)
|
||||
]
|
||||
|
||||
|
||||
def _register_keystoneauth_opts(conf):
|
||||
# Register keystone authentication related options.
|
||||
from keystonemiddleware import auth_token # noqa
|
||||
|
8
etc/os-config-generator/distil.conf
Normal file
8
etc/os-config-generator/distil.conf
Normal file
@ -0,0 +1,8 @@
|
||||
[DEFAULT]
|
||||
output_file = etc/distil.conf.sample
|
||||
namespace = distil.config
|
||||
namespace = oslo.db
|
||||
namespace = oslo.log
|
||||
namespace = oslo.messaging
|
||||
namespace = oslo.policy
|
||||
namespace = keystonemiddleware.auth_token
|
@ -31,6 +31,9 @@ console_scripts =
|
||||
distil-collector = distil.cmd.distil_collector:main
|
||||
distil-db-manage = distil.db.migration.cli:main
|
||||
|
||||
oslo.config.opts =
|
||||
distil.config = distil.config:list_opts
|
||||
|
||||
distil.collector =
|
||||
ceilometer = distil.collector.ceilometer:CeilometerCollector
|
||||
|
||||
|
6
tox.ini
6
tox.ini
@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = py26,py27,py33,pep8
|
||||
envlist = py34,py27,pep8
|
||||
minversion = 1.6
|
||||
skipsdist = True
|
||||
|
||||
@ -42,6 +42,10 @@ commands =
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
commands = bash tools/lintstack.sh
|
||||
|
||||
[testenv:genconfig]
|
||||
commands =
|
||||
oslo-config-generator --config-file etc/os-config-generator/distil.conf --output-file etc/distil.conf.sample
|
||||
|
||||
[flake8]
|
||||
ignore = F401,H302,H305,H306,H307,H404,H405
|
||||
show-source = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user