Add configuration page to docs

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

Change-Id: I8d8ed95ec603ea143a24d28dc92fa55600e0274e
This commit is contained in:
Maciej Józefczyk 2020-03-16 11:32:50 +00:00
parent af2b26afe6
commit e81342ae10
9 changed files with 64 additions and 0 deletions

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

View File

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

View File

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

0
etc/octavia/.placeholder Normal file
View File

View File

View File

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

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

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

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