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
This commit is contained in:
Eric Fried 2018-10-02 12:51:11 -05:00
parent 90a5ddb4b1
commit ce59136ce8
1 changed files with 1 additions and 1 deletions

View File

@ -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