Generate config file using oslo-config-generator

... so that we can review the available options more easily.

This also updates tox.ini to reuse the same environment for multiple
targets.

Change-Id: I561ff8a116c5a13784b83ff1450af965e6aff82c
This commit is contained in:
Takashi Kajinami 2024-01-12 16:53:04 +09:00
parent 841d419ed1
commit 5aff8a4b7c
3 changed files with 19 additions and 0 deletions

2
.gitignore vendored
View File

@ -46,6 +46,8 @@ nosetests.xml
# Translations
*.mo
etc/ovn-bgp-agent/*.sample
# Complexity
output/*.html
output/*/index.html

View File

@ -0,0 +1,8 @@
[DEFAULT]
output_file = etc/ovn-bgp-agent/bgp-agent.conf.sample
wrap_width = 79
namespace = oslo.concurrency
namespace = oslo.log
namespace = oslo.privsep
namespace = ovnbgpagent

View File

@ -32,6 +32,7 @@ commands =
stestr run --exclude-regex ".tests.unit" {posargs}
[testenv:cover]
envdir = {toxworkdir}/shared
setenv =
VIRTUAL_ENV={envdir}
PYTHON=coverage run --source ovn_bgp_agent --parallel-mode
@ -43,17 +44,25 @@ commands =
coverage report --fail-under=82 --skip-covered --omit='ovn_bgp_agent/tests/*,ovn_bgp_agent/privileged/linux_net.py,ovn_bgp_agent/utils/linux_net.py'
[testenv:docs]
envdir = {toxworkdir}/docs
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:debug]
envdir = {toxworkdir}/shared
commands = oslo_debug_helper {posargs}
[testenv:genconfig]
envdir = {toxworkdir}/shared
commands =
oslo-config-generator --config-file=etc/oslo-config-generator/bgp-agent.conf
[flake8]
# E123, E125 skipped as they are invalid PEP-8.