From fc463268542e3cf8d3d5f0aa298629d8ae3362f7 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 29 Jun 2016 10:39:02 -0400 Subject: [PATCH] Add plugin registry generation to sphinx build This commit adds running the plugin registry generation script to the sphinx build. This ensure that every time we build the docs we'll have an up-to-date plugin registry. This comes at the cost of increased build time since the script will query openstack's git server to get the plugin list. Also, the plugin-registry source file was added to .gitignore since it is autogenerated now. Change-Id: Ib26124c5d5d5ef4617e4e702e594ce7f1795ce23 --- .gitignore | 1 + doc/source/conf.py | 11 +++++++++++ doc/source/plugin-registry.rst | 23 ----------------------- 3 files changed, 12 insertions(+), 23 deletions(-) delete mode 100644 doc/source/plugin-registry.rst diff --git a/.gitignore b/.gitignore index 5b87cece89..e96deb185c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ build !.coveragerc cover/ doc/source/_static/tempest.conf.sample +doc/source/plugin-registry.rst # Files created by releasenotes build releasenotes/build diff --git a/doc/source/conf.py b/doc/source/conf.py index eef3620a35..127613dcb4 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -15,6 +15,17 @@ import sys import os import subprocess +# Build the plugin registry +def build_plugin_registry(app): + root_dir = os.path.dirname( + os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + subprocess.call(['tools/generate-tempest-plugins-list.sh'], cwd=root_dir) + +def setup(app): + app.connect('builder-inited', build_plugin_registry) + + + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. diff --git a/doc/source/plugin-registry.rst b/doc/source/plugin-registry.rst deleted file mode 100644 index 517e5b8a96..0000000000 --- a/doc/source/plugin-registry.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. - Note to patch submitters: this file is covered by a periodic proposal - job. You should edit the files data/tempest-plugins-registry.footer - data/tempest-plugins-registry.header instead of this one. - -========================== - Tempest Plugin Registry -========================== - -Since we've created the external plugin mechanism, it's gotten used by -a lot of projects. The following is a list of plugins that currently -exist. - -Detected Plugins -================ - -The following will list plugins that a script has found in the openstack/ -namespace, which includes but is not limited to official OpenStack -projects. - -+----------------------------+-------------------------------------------------------------------------+ -|Plugin Name |URL | -+----------------------------+-------------------------------------------------------------------------+