Merge "Add sample config file to cinder docs"

This commit is contained in:
Jenkins
2016-06-09 23:00:39 +00:00
committed by Gerrit Code Review
10 changed files with 59 additions and 199 deletions

View File

View File

@@ -34,9 +34,13 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.ifconfig',
'sphinx.ext.graphviz',
'oslosphinx',
'stevedore.sphinxext'
'stevedore.sphinxext',
'oslo_config.sphinxconfiggen',
]
config_generator_config_file = '../../cinder/config/cinder-config-generator.conf'
sample_config_basename = '_static/cinder'
# autodoc generation is a bit aggressive and a nuisance
# when doing heavy text edit cycles. Execute "export SPHINX_DEBUG=1"
# in your terminal to disable

View File

@@ -1,39 +0,0 @@
Generation of Sample Configuration Options
==========================================
opts.py
-------
This file is dynamically created through the following commands and is used
in the generation of the cinder.conf.sample file by the oslo config generator.
It is kept in tree because deployers cannot run tox -e genconfig due to
dependency issues. To generate this file only, use the command 'tox -e genopts'.
To generate the cinder.conf.sample file use the command 'tox -e genconfig'.
tox -e genconfig
----------------
This command will generate a new cinder.conf.sample file by running the
cinder/tools/config/generate_sample.sh script.
tox -e genopts
--------------
This command dynamically generates the opts.py file only in the
event that new configuration options have been added. To do this it
runs the generate_sample.sh with the --nosamplefile option.
check_uptodate.sh
-----------------
This script will check that the opts.py file exists and if it does, it
will then create a temp opts.py file to verify that the current opts.py
file is up to date with all new configuration options that may have been
added. If it is not up to date it will suggest the generation of a new
file using 'tox -e genopts'.
generate_sample.sh
------------------
This script is responsible for calling the generate_cinder_opts.py file
which dynamically generates the opts.py file by parsing through the entire
cinder project. All instances of CONF.register_opt() and CONF.register_opts()
are collected and the needed arguments are pulled out of those methods. A
list of the options being registered is created to be written to the opts.py file.
Later, the oslo config generator takes in the opts.py file, parses through
those lists and creates the sample file.

View File

@@ -52,6 +52,14 @@ API Extensions
Go to http://api.openstack.org for information about Cinder API extensions.
Sample Configuration File
=========================
.. toctree::
:maxdepth: 1
sample_config
Outstanding Documentation Tasks
===============================

View File

@@ -0,0 +1,13 @@
============================
Cinder Configuration Options
============================
The following is a sample Cinder configuration for adaptation and use. It is
auto-generated from Cinder when this documentation is built, so if you are
having issues with an option, please compare your version of Cinder with the
version of this documentation.
The sample configuration can also be viewed in
`file form <_static/cinder.conf.sample>`_.
.. literalinclude:: _static/cinder.conf.sample