Auto generate cyborg.conf with oslo-config-generator

Change-Id: If7cbf3701bb7b5ef0e0536339f8c1df9557f0688
This commit is contained in:
zhuli 2017-12-08 10:58:25 +08:00
parent 111630aa07
commit a1e4b44797
3 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,5 @@
To generate the sample cyborg.conf file, run the following
command from the top level of the cyborg directory:
tox -egenconfig

View File

@ -0,0 +1,14 @@
[DEFAULT]
output_file = etc/cyborg/cyborg.conf.sample
wrap_width = 62
namespace = cyborg
namespace = oslo.db
namespace = oslo.messaging
namespace = oslo.policy
namespace = oslo.log
namespace = oslo.reports
namespace = oslo.service.service
namespace = oslo.service.periodic_task
namespace = oslo.service.sslutils
namespace = keystonemiddleware.auth_token

11
tox.ini
View File

@ -22,6 +22,13 @@ envdir = {toxworkdir}/venv
commands =
oslopolicy-sample-generator --config-file=tools/config/cyborg-policy-generator.conf
[testenv:genconfig]
sitepackages = False
envdir = {toxworkdir}/venv
commands =
oslo-config-generator --config-file=tools/config/cyborg-config-generator.conf
[testenv:pep8]
commands = pep8 {posargs}
@ -36,7 +43,9 @@ commands = {posargs}
commands = python setup.py testr --coverage --testr-args='{posargs}'
[testenv:docs]
commands = python setup.py build_sphinx
commands =
python setup.py build_sphinx
oslo-config-generator --config-file=tools/config/cyborg-config-generator.conf
[testenv:debug]
commands = oslo_debug_helper {posargs}