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
diff --git a/doc/source/conf.py b/doc/source/conf.py
index eef3620..127613d 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -15,6 +15,17 @@
 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.