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:56:19 -05:00
parent 965941f1e6
commit 394ce3e413

View File

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