Skip to content

Commit

Permalink
Merge pull request #178 from stackhpc/upstream/2024.1-2024-12-02
Browse files Browse the repository at this point in the history
Synchronise 2024.1 with upstream
  • Loading branch information
priteau authored Dec 2, 2024
2 parents 206c23d + d5f6dcf commit f146c6e
Show file tree
Hide file tree
Showing 6 changed files with 441 additions and 381 deletions.
2 changes: 2 additions & 0 deletions magnum/common/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from eventlet.green import threading
from oslo_context import context
from oslo_db.sqlalchemy import enginefacade

from magnum.common import policy

Expand All @@ -20,6 +21,7 @@
CONF = magnum.conf.CONF


@enginefacade.transaction_context_provider
class RequestContext(context.RequestContext):
"""Extends security contexts from the OpenStack common library."""

Expand Down
4 changes: 2 additions & 2 deletions magnum/db/sqlalchemy/alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from logging import config as log_config

from alembic import context
from oslo_db.sqlalchemy import enginefacade

from magnum.db.sqlalchemy import api as sqla_api
from magnum.db.sqlalchemy import models

# this is the Alembic Config object, which provides
Expand Down Expand Up @@ -43,7 +43,7 @@ def run_migrations_online():
and associate a connection with the context.
"""
engine = sqla_api.get_engine()
engine = enginefacade.writer.get_engine()
with engine.connect() as connection:
context.configure(connection=connection,
target_metadata=target_metadata)
Expand Down
Loading

0 comments on commit f146c6e

Please sign in to comment.