deb-oslo.config/doc/source/sphinxconfiggen.rst
Hemanth Makkapati 9c6bbb1a6c Fix typo in sphinxconfiggen docs
Change-Id: Ib70565b5dc547c1805ddf809b6d2a9abab94d7fc
2016-05-10 13:19:39 -05:00

1.2 KiB

Sphinx Oslo Sample Config Generation

Included with oslo.config is a sphinx extension to generate a sample config file at the beginning of each sphinx build. To activate the extension add oslo_config.sphinxconfiggen to the list of extensions in your sphinx conf.py.

Then you just need to use the config_generator_config_file option to point the config generator at the config file which tells it how to generate the sample config. If one isn't specified or it doesn't point to a real file the sample config file generation will be skipped.

Output File Name

By default the sphinx plugin will generate the sample config file and name the file sample.config. However, if for whatever reason you'd like the name to be more specific to the project name you can use the sample_config_basename config option to specify the project name. If it's set the output filename will be that value with a .conf.sample extension. For example if you set that to be nova the output filename will be nova.conf.sample. You can also put a subdirectory off of the srcdir as part of this value.