summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Treinish <mtreinish@kortar.org>2015-08-13 16:18:46 -0400
committerMatthew Treinish <mtreinish@kortar.org>2015-09-30 22:35:46 +0000
commit9a3ed7631a7654cf7656ece6875cb09ee301f991 (patch)
treef1133441a48368dd50f5ab9302679c08118ce9b3
parentb0013d93ffeaed53bc28d9558def26bdb7041ed7 (diff)
downloadnova-9a3ed7631a7654cf7656ece6875cb09ee301f991.tar.gz
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
-rw-r--r--.gitignore1
-rw-r--r--doc/source/conf.py4
-rw-r--r--doc/source/index.rst9
-rw-r--r--doc/source/sample_config.rst12
4 files changed, 26 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index b7c21ef338..3b16a68a11 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 cf5bccad7f..9b7d4d94f6 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 c807a655ac..81cabfe9a7 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 0000000000..ae8e6f17bf
--- /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