openstack-doc-tools/autogenerate_config_docs
Tom Fifield 3363d2e1cb Fix xml tagging for non-swift config tables
A previous patch attempted to introduce semantic tagging for
options and their default values in the automatically
generated configuration reference tables.

While this worked well for swift, incorrect code was used
for the XML generation of the main autohelp.py method.

This patch fixes the string based code to use XML subElements
as was already done for extract_swift_flags.

Change-Id: I93a89b726d66acd0778e8365f47d5ee2f2e0b3c5
2015-01-01 19:14:43 +08:00
..
test Merge "Remove @author tags from copyright statements" 2014-10-09 05:24:38 +00:00
README.rst Update the autohelp readme 2014-08-26 08:25:07 +02:00
__init__.py Rename autogenerate-config-docs to autogenerate_config_docs 2014-01-21 17:00:22 +01:00
autohelp-wrapper wrapper: clean the source dir before a checkout 2014-09-08 06:36:47 +02:00
autohelp.py Fix xml tagging for non-swift config tables 2015-01-01 19:14:43 +08:00
diff_branches.py Change config changes generator script 2014-12-12 16:12:33 +01:00
extract_swift_flags.py Add <option> tags to options in autogenerateconfig 2014-12-31 16:17:20 +08:00
flow.dia Rename autogenerate-config-docs to autogenerate_config_docs 2014-01-21 17:00:22 +01:00
hooks.py Don't fail if glance_store is not available 2014-09-28 20:49:03 +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.

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.