Use stevedore directive to document plugins

Add directives to the documentation to bring in the docstrings from the
plugins.

Change-Id: I2afe1d1e4a9abfa1d3cdf85bc4008ff8f772123c
This commit is contained in:
Allison Randal 2015-08-28 19:06:32 +00:00 committed by Doug Hellmann
parent 7511fdde70
commit b43844b19c
3 changed files with 17 additions and 8 deletions

View File

@ -23,7 +23,8 @@ extensions = [
'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
'oslo_config.sphinxext',
'oslosphinx'
'oslosphinx',
'stevedore.sphinxext'
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy

View File

@ -136,3 +136,11 @@ DB API backend support
# DB-API method
def do_something(somethind_id):
return IMPL.do_something(somethind_id)
DB migration extensions
=======================
Available extensions for :mod:`oslo_db.migration`.
.. list-plugins:: oslo.db.migration
:detailed:

View File

@ -21,6 +21,13 @@ from oslo_db.sqlalchemy.migration_cli import ext_base
class AlembicExtension(ext_base.MigrationExtensionBase):
"""Extension to provide alembic features.
:param engine: SQLAlchemy engine instance for a given database
:type engine: sqlalchemy.engine.Engine
:param migration_config: Stores specific configuration for migrations
:type migration_config: dict
"""
order = 2
@ -29,13 +36,6 @@ class AlembicExtension(ext_base.MigrationExtensionBase):
return os.path.exists(self.alembic_ini_path)
def __init__(self, engine, migration_config):
"""Extension to provide alembic features.
:param engine: SQLAlchemy engine instance for a given database
:type engine: sqlalchemy.engine.Engine
:param migration_config: Stores specific configuration for migrations
:type migration_config: dict
"""
self.alembic_ini_path = migration_config.get('alembic_ini_path', '')
self.config = alembic_config.Config(self.alembic_ini_path)
# TODO(viktors): Remove this, when we will use Alembic 0.7.5 or