From ce59136ce8e63793d8cea6604f2949434e7d3a51 Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Tue, 2 Oct 2018 12:51:11 -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 --- placement/db_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/placement/db_api.py b/placement/db_api.py index 83105e00c..6ab5d24b2 100644 --- a/placement/db_api.py +++ b/placement/db_api.py @@ -31,7 +31,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