diff --git a/doc/source/conf.py b/doc/source/conf.py index aa53ed0..69fb87a 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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 diff --git a/doc/source/usage.rst b/doc/source/usage.rst index cc4f2fd..e437c6c 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -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: diff --git a/oslo_db/sqlalchemy/migration_cli/ext_alembic.py b/oslo_db/sqlalchemy/migration_cli/ext_alembic.py index a855321..e44fbc8 100644 --- a/oslo_db/sqlalchemy/migration_cli/ext_alembic.py +++ b/oslo_db/sqlalchemy/migration_cli/ext_alembic.py @@ -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