From 394ce3e413093b9b891bf4cb11dbb0e562b43a93 Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Tue, 2 Oct 2018 12:56:19 -0500 Subject: [PATCH] Placement: Remove usage of get_legacy_facade() Warnings emitted to the python 3 unit tests: OsloDBDeprecationWarning: EngineFacade is deprecated; please use oslo_db.sqlalchemy.enginefacade stem from our use of the get_legacy_facade() oslo.db method. Following on from [1], this replaces the get_legacy_facade() usage with the writer transaction context for the placement database. This is done in both openstack/placement and openstack/nova under the same Change-Id. [1] If1e355d6174f15a1880e97115a2cf3f9f4be837e Change-Id: I5f3a7c2c81bd908be30f7bcd9cda7e0ff5b48226 --- nova/api/openstack/placement/db_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/api/openstack/placement/db_api.py b/nova/api/openstack/placement/db_api.py index 792c168a384e..7a0803e9e0dc 100644 --- a/nova/api/openstack/placement/db_api.py +++ b/nova/api/openstack/placement/db_api.py @@ -36,7 +36,7 @@ def configure(conf): def get_placement_engine(): - return placement_context_manager.get_legacy_facade().get_engine() + return placement_context_manager.writer.get_engine() @enginefacade.transaction_context_provider