From 0d8b9ec347459c302518b1080c8af2a01021d945 Mon Sep 17 00:00:00 2001 From: Lucian Petrut Date: Fri, 31 May 2019 10:46:14 +0300 Subject: [PATCH] docs: add automatically generated list of cfg opts This change will include an automatically generated list of config options in the cloudbase-init docs. It's useful as some config options are not currently mentioned in the docs and it's also nice to be able to have a quick overview of all available options without having to go through the code. You can also send links to certain config options or groups. Note that long config opt lines are not wrapped and look quite bad, especially with the current theme (may consider switching to some other theme, maybe the "alabaster" one included by default by sphinx). Still better than not having this at all though. We're also adding the zuul jobs that validate release notes and docs, required for testing this patch. Change-Id: Ibaff3a91e7f1345aaaac0c29b995e7c25b9e4669 --- .zuul.yaml | 8 ++++++++ doc/source/conf.py | 2 ++ doc/source/config.rst | 13 +++++++++++++ doc/source/index.rst | 1 + doc/source/tutorial.rst | 1 + 5 files changed, 25 insertions(+) create mode 100644 doc/source/config.rst diff --git a/.zuul.yaml b/.zuul.yaml index b7cefb38..2cc516b9 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,4 +1,12 @@ - project: + check: + jobs: + - build-openstack-releasenotes + - build-openstack-sphinx-docs + gate: + jobs: + - build-openstack-releasenotes + - build-openstack-sphinx-docs post: jobs: - cbsl-init-upload-git-mirror diff --git a/doc/source/conf.py b/doc/source/conf.py index 3a9714bf..211c6617 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -32,6 +32,8 @@ import shlex extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', + 'oslo_config.sphinxext' + ] # Add any paths that contain templates here, relative to this directory. diff --git a/doc/source/config.rst b/doc/source/config.rst new file mode 100644 index 00000000..f18af579 --- /dev/null +++ b/doc/source/config.rst @@ -0,0 +1,13 @@ +.. _config_list: + +=============================== +Configuration options reference +=============================== + +The following is an overview of all available configuration options in +cloudbase-init. + +.. show-options:: + + cloudbaseinit.conf + oslo.log diff --git a/doc/source/index.rst b/doc/source/index.rst index e46020d4..71306b2f 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -16,6 +16,7 @@ Contents: services plugins userdata + config Indices and tables diff --git a/doc/source/tutorial.rst b/doc/source/tutorial.rst index 6bc012b0..a36a9eca 100644 --- a/doc/source/tutorial.rst +++ b/doc/source/tutorial.rst @@ -93,6 +93,7 @@ initialization cases. More of these explained options are available under the :ref:`services`, :ref:`plugins` and :ref:`userdata` documentation. +A complete list of config options can be found at :ref:`config_list`. .. _execution: