openstack-doc-tools/autogenerate_config_docs
Ruby Loo 6329eea32a autohelp: use correct option names from extensions
autohelp's OptionsCache.load_extension_options() loads options from
libraries. An oslo_config.cfg.Opt object has a 'name' attribute and
a 'dest' attribute. The option name that we're interested in (that
the user sets) is the 'dest' value, not the 'name' value. The
load_extension_options() method was incorrectly using the option's
'name' attribute.

This fixes it so that the option's 'dest' attribute is used instead.
Eg, from oslo_log library, it now correctly uses 'log_config_append'
instead of 'log-config-append'.

Change-Id: I01422bf33be286cc0176a3e1e4ac1c348c6821ef
Closes-Bug: #1464058
2015-06-11 02:00:51 +00:00
..
requirements autohelp: updated to handle juno 2015-04-29 17:07:21 +02:00
test Drop use of 'oslo' namespace package 2015-04-28 22:18:23 +00:00
README.rst Update README.rst notes for Neutron project due to recent vendor decomposition. 2015-04-07 14:56:30 -07:00
__init__.py Rename autogenerate-config-docs to autogenerate_config_docs 2014-01-21 17:00:22 +01:00
autohelp-wrapper let the autohelp_wrapper use local repos 2015-06-03 16:23:38 +02:00
autohelp.py autohelp: use correct option names from extensions 2015-06-11 02:00:51 +00:00
diff_branches.py diff_branches: improve handling of deprecated options 2015-05-09 21:53:51 +02:00
extract_swift_flags.py Drop use of 'oslo' namespace package 2015-04-28 22:18:23 +00:00
flow.dia Rename autogenerate-config-docs to autogenerate_config_docs 2014-01-21 17:00:22 +01:00
hooks.py autohelp: updated to handle juno 2015-04-29 17:07:21 +02:00
requirements.txt Update the autohelp readme 2014-08-26 08:25:07 +02:00

README.rst

autogenerate_config_docs

Automatically generate configuration tables to document OpenStack.

Using the wrapper

autohelp-wrapper is the recommended tool to generate the configuration tables. Don't bother using autohelp.py manually.

The autohelp-wrapper script installs a virtual environment and all the needed dependencies, clones or updates the projects and manuals repositories, then runs the autohelp.py script in the virtual environment.

New and updated flagmappings are generated in the openstack-manuals repository (tools/autogenerate-config-flagmappings/ directory).

The workflow is:

$ pip install -rrequirements.txt
$ ./autohelp-wrapper update
$ $EDITOR sources/openstack-manuals/tools/autogenerate-config-flagmappings/*.flagmappings
$ ./autohelp-wrapper docbook
$ # check the results in sources/openstack-manuals

This will generate the tables for all the known projects. Note for Neutron project: If the driver/plugin resides outside the Neutron repository in stackforge, then the driver/plugin has to be explicitly installed within the virtual environment to generate the configuration options.

To generate the mappings and tables for a subset of projects, use the code names as arguments:

$ ./autohelp-wrapper update cinder heat
$ # edit the mappings files
$ ./autohelp-wrapper docbook cinder heat

Creating mappings for a new project

Run the wrapper with the create subcommand:

$ ./autohelp-wrapper create zaqar

Flagmappings files

The flagmappings files use the following format:

OPTION_SECTION/OPTION_NAME group1 [group2, ...]

Groups need to be defined manually to organize the configuration tables.

The group values can only contain alphanumeric characters, _ and - (they will be used as docbook IDs).

To make the table titles more user friendly, create or edit the PROJECT.headers file in the manuals repository. Each line of this file is of the form:

GROUP A Nice Title

Working with branches

autohelp-wrapper works on the master branch by default, but you can tell it to work on another branch:

$ ./autohelp-wrapper update -b stable/icehouse

Note

The -b switch doesn't apply to the openstack-manuals repository which will be left untouched (no git branch, no git update).

Updating swift options

Swift configuration tables are generated using the extract_swift_flags.py script. This script doesn't use a mapping file, but organize the tables using the various configuration files and sections. Most of the options must be described manually at the moment.