From 83a9c2ac334712b27704a814552628cf0e536a85 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 3 Aug 2017 16:24:53 +0100 Subject: [PATCH] doc: Start using oslo_config.sphinxext Providing a sample configuration file is all well and good, but it's not exactly designed for readability on the web. Make use of the 'sphinxext' module built into oslo.config to do this. Change-Id: I75e8f0adae7cfaaa6020870cdb20dc2144fc70eb --- doc/source/conf.py | 1 + doc/source/configuration/config.rst | 9 +++++++++ doc/source/configuration/sample-config.rst | 19 ++++++++++++------- doc/source/index.rst | 5 +++-- 4 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 doc/source/configuration/config.rst diff --git a/doc/source/conf.py b/doc/source/conf.py index 02875cac1a4b..a45e0f4500b5 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -40,6 +40,7 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.graphviz', 'ext.support_matrix', 'oslo_config.sphinxconfiggen', + 'oslo_config.sphinxext', 'oslo_policy.sphinxpolicygen', 'ext.versioned_notifications', 'ext.feature_matrix', diff --git a/doc/source/configuration/config.rst b/doc/source/configuration/config.rst new file mode 100644 index 000000000000..8dd6394adc36 --- /dev/null +++ b/doc/source/configuration/config.rst @@ -0,0 +1,9 @@ +===================== +Configuration Options +===================== + +The following is an overview of all available configuration options in Nova. +For a sample configuration file, refer to :doc:`/configuration/sample-config`. + +.. show-options:: + :config-file: etc/nova/nova-config-generator.conf diff --git a/doc/source/configuration/sample-config.rst b/doc/source/configuration/sample-config.rst index 54b1bd1fdb7d..08ddc14f4b4e 100644 --- a/doc/source/configuration/sample-config.rst +++ b/doc/source/configuration/sample-config.rst @@ -1,13 +1,18 @@ -========================== -Nova Configuration Options -========================== +========================= +Sample Configuration File +========================= -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 following is a sample nova configuration for adaptation and use. For a +detailed overview of all available configuration options, refer to +:doc:`/configuration/config`. The sample configuration can also be viewed in :download:`file form `. +.. important:: + + The sample configuration file is auto-generated from nova when this + documentation is built. You must ensure your version of nova matches the + version of this documentation. + .. literalinclude:: /_static/nova.conf.sample diff --git a/doc/source/index.rst b/doc/source/index.rst index 4d17a822ab82..c7fe6d2b7987 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -194,12 +194,13 @@ Advanced testing and guides contributor/testing/serial-console contributor/testing/zero-downtime-upgrade -Sample Configuration File -------------------------- +Configuration +------------- .. toctree:: :maxdepth: 1 + configuration/config configuration/sample-config Sample Policy file