Add auto-generated config reference
oslo.config provides sphinx extensions to generate config reference and sample config files. This commit enables the auto-generation of the networking config reference. Part of doc-migration work Change-Id: Ia6001f0d856fa1d06916fa7e474657f91a8011aa
This commit is contained in:
9 changed files with 94 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
@@ -45,6 +45,7 @@ output/*/index.html
# Documentation
doc/build
doc/source/_static/config-samples/*.sample
etc/**/*.sample
# pbr generates these
0
doc/source/_static/.placeholder
Normal file
0
doc/source/_static/.placeholder
Normal file
@@ -24,7 +24,9 @@ extensions = [
'sphinxcontrib.blockdiag',
'sphinxcontrib.seqdiag',
#'sphinx.ext.intersphinx',
'openstackdocstheme'
'openstackdocstheme',
'oslo_config.sphinxext',
'oslo_config.sphinxconfiggen',
]
# openstackdocstheme options
@@ -62,7 +64,7 @@ pygments_style = 'sphinx'
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
# html_static_path = ['static']
html_static_path = ['_static']
html_theme = 'openstackdocs'
html_last_updated_fmt = '%Y-%m-%d%H:%M'
@@ -89,3 +91,22 @@ seq_antialias = True
seqdiag_html_image_format = "svg"
blockdiag_html_image_format = "svg"
# -- Options for oslo_config.sphinxconfiggen ---------------------------------
_config_generator_config_files = [
'networking-bgpvpn.conf',
'opencontrail-driver.conf',
]
def _get_config_generator_config_definition(config_file):
config_file_path = '../../etc/oslo-config-generator/%s' % conf
# oslo_config.sphinxconfiggen appends '.conf.sample' to the filename,
# strip file extentension (.conf or .ini).
output_file_path = '_static/config-samples/%s' % conf.rsplit('.', 1)[0]
return (config_file_path, output_file_path)
config_generator_config_file = [
_get_config_generator_config_definition(conf)
for conf in _config_generator_config_files
]
31
doc/source/configuration/index.rst
Normal file
31
doc/source/configuration/index.rst
Normal file
@@ -0,0 +1,31 @@
=====================
Configuration Options
=====================
This section provides a list of all possible options for each
configuration file.
These are generated from code and reflect the current state of code
in the networking-bgpvpn repository.
Configuration Reference
-----------------------
networking-bgpvpn uses the following configuration files for its
various services.
.. toctree::
:glob:
:maxdepth: 1
*
Sample Configuration Files
--------------------------
The following are sample configuration files for all networking-bgpvpn.
.. toctree::
:glob:
:maxdepth: 1
samples/*
14
doc/source/configuration/networking-bgpvpn.rst
Normal file
14
doc/source/configuration/networking-bgpvpn.rst
Normal file
@@ -0,0 +1,14 @@
======================
networking-bgpvpn.conf
======================
To use networking-bgpvpn, you need to configure one of valid service providers
for ``BGPVPN`` service in ``service_provider`` of ``[service_providers]``
group of the neutron server. Note that you can specify multiple providers for
BGPVPN but only one of them can be default.
* Dummy provider: ``service_provider = BGPVPN:Dummy:networking_bgpvpn.neutron.services.service_drivers.driver_api.BGPVPNDriver:default``
* BaGPipe provider: ``service_provider = BGPVPN:BaGPipe:networking_bgpvpn.neutron.services.service_drivers.bagpipe.bagpipe.BaGPipeBGPVPNDriver:default``
.. show-options::
:config-file: etc/oslo-config-generator/networking-bgpvpn.conf
6
doc/source/configuration/opencontrail-driver.rst
Normal file
6
doc/source/configuration/opencontrail-driver.rst
Normal file
@@ -0,0 +1,6 @@
========================
opencontrail-driver.conf
========================
.. show-options::
:config-file: etc/oslo-config-generator/opencontrail-driver.conf
9
doc/source/configuration/samples/networking-bgpvpn.rst
Normal file
9
doc/source/configuration/samples/networking-bgpvpn.rst
Normal file
@@ -0,0 +1,9 @@
=============================
Sample networking-bgpvpn.conf
=============================
This sample configuration can also be viewed in `the raw format
<../../_static/config-samples/networking-bgpvpn.conf.sample>`_.
.. literalinclude::
../../_static/config-samples/networking-bgpvpn.conf.sample
9
doc/source/configuration/samples/opencontrail-driver.rst
Normal file
9
doc/source/configuration/samples/opencontrail-driver.rst
Normal file
@@ -0,0 +1,9 @@
===============================
Sample opencontrail-driver.conf
===============================
This sample configuration can also be viewed in `the raw format
<../../_static/config-samples/opencontrail-driver.conf.sample>`_.
.. literalinclude::
../../_static/config-samples/opencontrail-driver.conf.sample
@@ -36,6 +36,7 @@ Contents
user/index
install/index
configuration/index
contributor/index
.. rubric:: Indices and Tables
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.