Switch to new engine facade for BaseResourceFilter
Partially-Implements blueprint: enginefacade-switch Change-Id: I1785ee36ef2a74c8673d6834ac4227a67c55daa3
This commit is contained in:
parent
b7b399f16e
commit
93d75d89a0
@ -15,6 +15,7 @@
|
||||
|
||||
import abc
|
||||
|
||||
from neutron_lib.db import api as db_api
|
||||
import six
|
||||
|
||||
|
||||
@ -27,7 +28,7 @@ class BaseResourceFilter(object):
|
||||
|
||||
def bind(self, context, agents, resource_id):
|
||||
"""Bind the resource to the agents."""
|
||||
with context.session.begin(subtransactions=True):
|
||||
with db_api.CONTEXT_WRITER.using(context):
|
||||
for agent in agents:
|
||||
# Load is being incremented here to reflect latest agent load
|
||||
# even within the agent report interval. This will be very
|
||||
|
Loading…
x
Reference in New Issue
Block a user