File tree Expand file tree Collapse file tree 6 files changed +441
-381
lines changed Expand file tree Collapse file tree 6 files changed +441
-381
lines changed Original file line number Diff line number Diff line change 12
12
13
13
from eventlet .green import threading
14
14
from oslo_context import context
15
+ from oslo_db .sqlalchemy import enginefacade
15
16
16
17
from magnum .common import policy
17
18
20
21
CONF = magnum .conf .CONF
21
22
22
23
24
+ @enginefacade .transaction_context_provider
23
25
class RequestContext (context .RequestContext ):
24
26
"""Extends security contexts from the OpenStack common library."""
25
27
Original file line number Diff line number Diff line change 13
13
from logging import config as log_config
14
14
15
15
from alembic import context
16
+ from oslo_db .sqlalchemy import enginefacade
16
17
17
- from magnum .db .sqlalchemy import api as sqla_api
18
18
from magnum .db .sqlalchemy import models
19
19
20
20
# this is the Alembic Config object, which provides
@@ -43,7 +43,7 @@ def run_migrations_online():
43
43
and associate a connection with the context.
44
44
45
45
"""
46
- engine = sqla_api .get_engine ()
46
+ engine = enginefacade . writer .get_engine ()
47
47
with engine .connect () as connection :
48
48
context .configure (connection = connection ,
49
49
target_metadata = target_metadata )
You can’t perform that action at this time.
0 commit comments