Switch to new enginefacade in uplink_status_propagation UT module

Partially-Implements blueprint: enginefacade-switch

Change-Id: I4c5935bb1e7232aed01bed7061e41eb10f8bab9b
This commit is contained in:
Slawek Kaplonski 2020-08-27 22:28:16 +02:00
parent 856cae4cf8
commit eafa4ae6c8
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@
import ddt
from neutron_lib.api.definitions import uplink_status_propagation as apidef
from neutron_lib.db import api as db_api
from neutron_lib.db import resource_extend
from neutron.db import db_base_plugin_v2
@ -34,7 +35,7 @@ class UplinkStatusPropagationExtensionTestPlugin(
port_res, port_db)
def create_port(self, context, port):
with context.session.begin(subtransactions=True):
with db_api.CONTEXT_WRITER.using(context):
new_port = super(UplinkStatusPropagationExtensionTestPlugin,
self).create_port(context, port)
# Update the propagate_uplink_status in the database