Merge "Add auto-generated config reference"

This commit is contained in:
Jenkins 2017-07-28 08:27:44 +00:00 committed by Gerrit Code Review
commit c7256bea09
9 changed files with 86 additions and 1 deletions

1
.gitignore vendored
View File

@ -6,6 +6,7 @@ cover/
covhtml/
dist/
doc/build
doc/source/_static/config_samples/*.sample
doc/source/contributor/api/
etc/*.sample
*.DS_Store

View File

View File

@ -46,6 +46,8 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.ifconfig',
'sphinx.ext.graphviz',
'sphinx.ext.todo',
'oslo_config.sphinxext',
'oslo_config.sphinxconfiggen',
'openstackdocstheme',]
todo_include_todos = True
@ -163,7 +165,7 @@ html_theme = 'openstackdocs'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
@ -242,3 +244,24 @@ html_last_updated_fmt = '%Y-%m-%d %H:%M'
repository_name = 'openstack/neutron-fwaas'
bug_project = 'neutron'
bug_tag = 'doc'
# -- Options for oslo_config.sphinxconfiggen ---------------------------------
_config_generator_config_files = [
'fwaas_driver.ini',
'neutron_fwaas.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
]

View File

@ -0,0 +1,6 @@
================
fwaas_driver.ini
================
.. show-options::
:config-file: etc/oslo-config-generator/fwaas_driver.ini

View File

@ -0,0 +1,32 @@
.. _configuring:
=============================
Neutron Configuration Options
=============================
This section provides a list of all possible options for each
configuration file.
Configuration Reference
-----------------------
Neutron uses the following configuration files for its various services.
.. toctree::
:glob:
:maxdepth: 1
*
Sample Configuration Files
--------------------------
The following are sample configuration files for all Neutron services and
utilities. These are generated from code and reflect the current state of code
in the Neutron repository.
.. toctree::
:glob:
:maxdepth: 1
samples/*

View File

@ -0,0 +1,6 @@
==================
neutron_fwaas.conf
==================
.. show-options::
:config-file: etc/oslo-config-generator/neutron_fwaas.conf

View File

@ -0,0 +1,8 @@
=======================
Sample fwaas_driver.ini
=======================
This sample configuration can also be viewed in `the raw format
<../../_static/config_samples/fwaas_driver.conf.sample>`_.
.. literalinclude:: ../../_static/config_samples/fwaas_driver.conf.sample

View File

@ -0,0 +1,8 @@
=========================
Sample neutron_fwaas.conf
=========================
This sample configuration can also be viewed in `the raw format
<../../_static/config_samples/neutron_fwaas.conf.sample>`_.
.. literalinclude:: ../../_static/config_samples/neutron_fwaas.conf.sample

View File

@ -9,6 +9,7 @@ General Information and Other Project References:
:maxdepth: 2
install/index
configuration/index
contributor/index
.. rubric:: Indices and tables