Browse Source

Add configuration page to docs

This page was missing. Added also tox env to generate config.

Change-Id: I8d8ed95ec603ea143a24d28dc92fa55600e0274e
changes/12/713212/9
Maciej Józefczyk 1 year ago
parent
commit
e81342ae10
9 changed files with 64 additions and 0 deletions
  1. +14
    -0
      doc/source/configuration/config.rst
  2. +10
    -0
      doc/source/configuration/index.rst
  3. +1
    -0
      doc/source/index.rst
  4. +0
    -0
      etc/octavia/.placeholder
  5. +0
    -0
      etc/octavia/conf.d/.placeholder
  6. +5
    -0
      etc/oslo-config-generator/ovn.conf
  7. +3
    -0
      setup.cfg
  8. +26
    -0
      tools/generate_config_file_samples.sh
  9. +5
    -0
      tox.ini

+ 14
- 0
doc/source/configuration/config.rst View File

@ -0,0 +1,14 @@
=======================
Configuration Reference
=======================
This section provides a list of all configuration options for OVN Octavia
provider. These are auto-generated from OVN Octavia provider code when
this documentation is built.
Configuration filenames used below are filenames usually used, but there
is no restriction on configuration filename and you can use
arbitrary file names.
.. show-options::
:config-file: etc/oslo-config-generator/ovn.conf

+ 10
- 0
doc/source/configuration/index.rst View File

@ -0,0 +1,10 @@
.. _configuring:
===================
Configuration Guide
===================
.. toctree::
:maxdepth: 1
config

+ 1
- 0
doc/source/index.rst View File

@ -28,6 +28,7 @@ Contents
admin/index
contributor/index
configuration/index
Search
------


+ 0
- 0
etc/octavia/.placeholder View File


+ 0
- 0
etc/octavia/conf.d/.placeholder View File


+ 5
- 0
etc/oslo-config-generator/ovn.conf View File

@ -0,0 +1,5 @@
[DEFAULT]
output_file = etc/octavia/conf.d/ovn.conf.sample
wrap_width = 79
namespace = octavia.api.drivers.ovn

+ 3
- 0
setup.cfg View File

@ -30,3 +30,6 @@ setup-hooks =
[entry_points]
octavia.api.drivers =
ovn = ovn_octavia_provider.driver:OvnProviderDriver
oslo.config.opts =
octavia.api.drivers.ovn = ovn_octavia_provider.common.config:list_opts

+ 26
- 0
tools/generate_config_file_samples.sh View File

@ -0,0 +1,26 @@
#!/bin/sh
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -e
GEN_CMD=oslo-config-generator
if ! type "$GEN_CMD" > /dev/null; then
echo "ERROR: $GEN_CMD not installed on the system."
exit 1
fi
for file in `ls etc/oslo-config-generator/*`; do
$GEN_CMD --config-file=$file
done

+ 5
- 0
tox.ini View File

@ -29,6 +29,7 @@ commands = flake8
{toxinidir}/tools/check_unit_test_structure.sh
{toxinidir}/tools/coding-checks.sh --pylint '{posargs}'
{[testenv:bandit]commands}
{[testenv:genconfig]commands}
[testenv:venv]
commands = {posargs}
@ -109,6 +110,10 @@ show-source = True
exclude=./.*,dist,doc,*egg*,build,releasenotes
import-order-style = pep8
[testenv:genconfig]
envdir = {toxworkdir}/shared
commands = {toxinidir}/tools/generate_config_file_samples.sh
[hacking]
import_exceptions = ovn_octavia_provider.i18n
local-check-factory = neutron_lib.hacking.checks.factory


Loading…
Cancel
Save