From 9a3ed7631a7654cf7656ece6875cb09ee301f991 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 13 Aug 2015 16:18:46 -0400 Subject: [PATCH] Add sample config file to nova docs This commit adds sample config file generation to the nova devref using the oslo.config sphinxconfiggen module which was recently added. This will generate a new sample config each time build sphinx is run. This is then used on a new docs page where you can either view the file in its entirety, or download the file. The sphinx module was added in the oslo.config 2.3.0 release. Change-Id: I6d9150d81c8204bee8f775021a854928671bdd02 --- .gitignore | 1 + doc/source/conf.py | 4 ++++ doc/source/index.rst | 9 +++++++++ doc/source/sample_config.rst | 12 ++++++++++++ 4 files changed, 26 insertions(+) create mode 100644 doc/source/sample_config.rst diff --git a/.gitignore b/.gitignore index b7c21ef338f3..3b16a68a1142 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ nosetests.xml nova/tests/cover/* nova/vcsversion.py tools/conf/nova.conf* +doc/source/_static/nova.conf.sample diff --git a/doc/source/conf.py b/doc/source/conf.py index cf5bccad7ffc..9b7d4d94f685 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -34,8 +34,12 @@ extensions = ['sphinx.ext.autodoc', 'oslosphinx', "ext.support_matrix", 'sphinxcontrib.seqdiag', + 'oslo_config.sphinxconfiggen', ] +config_generator_config_file = '../../etc/nova/nova-config-generator.conf' +sample_config_basename = '_static/nova' + todo_include_todos = True # The suffix of source filenames. diff --git a/doc/source/index.rst b/doc/source/index.rst index c807a655ac3e..81cabfe9a7d3 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -180,6 +180,15 @@ Advanced testing and guides testing/libvirt-numa testing/serial-console +Sample Configuration File +------------------------- + +.. toctree:: + :maxdepth: 1 + + sample_config + + Man Pages ---------- diff --git a/doc/source/sample_config.rst b/doc/source/sample_config.rst new file mode 100644 index 000000000000..ae8e6f17bf26 --- /dev/null +++ b/doc/source/sample_config.rst @@ -0,0 +1,12 @@ +========================== +Nova Configuration Options +========================== + +The following is a sample Nova configuration for adaptation and use. It is +auto-generated from Nova when this documentation is built, so +if you are having issues with an option, please compare your version of +Nova with the version of this documentation. + +The sample configuration can also be viewed in `file form <_static/nova.conf.sample>`_. + +.. literalinclude:: _static/nova.conf.sample