From 034de91e81c7d74db2c7c50387fee992b0fc57cf Mon Sep 17 00:00:00 2001 From: Sergey Lukjanov Date: Wed, 21 Oct 2015 16:06:16 +0300 Subject: [PATCH] Publish sample conf to docs Generate sample config file before each docs build and publish it Change-Id: I688d83e2c0e779582395275d0aaf7cc62e55eabd --- .gitignore | 1 + doc/source/conf.py | 6 +++++- doc/source/config-generator.conf | 1 + doc/source/index.rst | 1 + doc/source/userdoc/sampleconfig.rst | 8 ++++++++ 5 files changed, 16 insertions(+), 1 deletion(-) create mode 120000 doc/source/config-generator.conf create mode 100644 doc/source/userdoc/sampleconfig.rst diff --git a/.gitignore b/.gitignore index dc9b17ed..61143c12 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ sdist target tools/lintstack.head.py tools/pylint_exceptions +doc/source/sample.config diff --git a/doc/source/conf.py b/doc/source/conf.py index eecceee2..b043bd52 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -37,11 +37,15 @@ sys.path.append(os.path.abspath('../bin')) # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', - 'sphinx.ext.pngmath', 'sphinx.ext.viewcode', 'sphinxcontrib.httpdomain'] + 'sphinx.ext.pngmath', 'sphinx.ext.viewcode', 'sphinxcontrib.httpdomain', + 'oslo_config.sphinxconfiggen'] if not on_rtd: extensions.append('oslosphinx') +config_generator_config_file = 'config-generator.conf' +config_sample_basename = 'sahara' + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/doc/source/config-generator.conf b/doc/source/config-generator.conf new file mode 120000 index 00000000..1a611114 --- /dev/null +++ b/doc/source/config-generator.conf @@ -0,0 +1 @@ +../../tools/config/config-generator.sahara.conf \ No newline at end of file diff --git a/doc/source/index.rst b/doc/source/index.rst index 32e8e489..8e653d97 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -30,6 +30,7 @@ User guide userdoc/dashboard.guide userdoc/advanced.configuration.guide userdoc/upgrade.guide + userdoc/sampleconfig **How To** diff --git a/doc/source/userdoc/sampleconfig.rst b/doc/source/userdoc/sampleconfig.rst new file mode 100644 index 00000000..e4fa2dfd --- /dev/null +++ b/doc/source/userdoc/sampleconfig.rst @@ -0,0 +1,8 @@ +Sample sahara.conf file +======================= + +This is an automatically generated sample of the sahara.conf file. + +.. literalinclude:: ../sample.config + :language: ini + :linenos: