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:
parent
7511fdde70
commit
b43844b19c
@ -23,7 +23,8 @@ extensions = [
|
|||||||
'sphinx.ext.autodoc',
|
'sphinx.ext.autodoc',
|
||||||
#'sphinx.ext.intersphinx',
|
#'sphinx.ext.intersphinx',
|
||||||
'oslo_config.sphinxext',
|
'oslo_config.sphinxext',
|
||||||
'oslosphinx'
|
'oslosphinx',
|
||||||
|
'stevedore.sphinxext'
|
||||||
]
|
]
|
||||||
|
|
||||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||||
|
@ -136,3 +136,11 @@ DB API backend support
|
|||||||
# DB-API method
|
# DB-API method
|
||||||
def do_something(somethind_id):
|
def do_something(somethind_id):
|
||||||
return IMPL.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:
|
||||||
|
@ -21,6 +21,13 @@ from oslo_db.sqlalchemy.migration_cli import ext_base
|
|||||||
|
|
||||||
|
|
||||||
class AlembicExtension(ext_base.MigrationExtensionBase):
|
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
|
order = 2
|
||||||
|
|
||||||
@ -29,13 +36,6 @@ class AlembicExtension(ext_base.MigrationExtensionBase):
|
|||||||
return os.path.exists(self.alembic_ini_path)
|
return os.path.exists(self.alembic_ini_path)
|
||||||
|
|
||||||
def __init__(self, engine, migration_config):
|
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.alembic_ini_path = migration_config.get('alembic_ini_path', '')
|
||||||
self.config = alembic_config.Config(self.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
|
# TODO(viktors): Remove this, when we will use Alembic 0.7.5 or
|
||||||
|
Loading…
Reference in New Issue
Block a user