From 5aff8a4b7c929aa4e0c78c98bfc53232a5ce7a46 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 12 Jan 2024 16:53:04 +0900 Subject: [PATCH] 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 --- .gitignore | 2 ++ etc/oslo-config-generator/bgp-agent.conf | 8 ++++++++ tox.ini | 9 +++++++++ 3 files changed, 19 insertions(+) create mode 100644 etc/oslo-config-generator/bgp-agent.conf diff --git a/.gitignore b/.gitignore index 4cbb844c..b36b7bbd 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,8 @@ nosetests.xml # Translations *.mo +etc/ovn-bgp-agent/*.sample + # Complexity output/*.html output/*/index.html diff --git a/etc/oslo-config-generator/bgp-agent.conf b/etc/oslo-config-generator/bgp-agent.conf new file mode 100644 index 00000000..9edfae82 --- /dev/null +++ b/etc/oslo-config-generator/bgp-agent.conf @@ -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 diff --git a/tox.ini b/tox.ini index 31b3e14d..eee7fdd7 100644 --- a/tox.ini +++ b/tox.ini @@ -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.