use neutron-lib for _model_query
The model_query module is in neutron-lib and the CommonDBMixin will eventually be removed. This patch swiches use of the _model_query method over to query_with_hooks from neutron-lib. This patch also bumps the neutron-lib version up to 1.20.0 Change-Id: Ic32d92f6f956cd119722161fa2b157312d390dc0
This commit is contained in:
parent
31e510ffc8
commit
271bb0be80
|
@ -16,7 +16,7 @@ keystoneauth1>=3.4.0 # Apache-2.0
|
|||
keystonemiddleware>=4.17.0 # Apache-2.0
|
||||
netaddr>=0.7.18 # BSD
|
||||
netifaces>=0.10.4 # MIT
|
||||
neutron-lib>=1.16.0 # Apache-2.0
|
||||
neutron-lib>=1.20.0 # Apache-2.0
|
||||
retrying!=1.3.0,>=1.2.3 # Apache-2.0
|
||||
SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.0.10 # MIT
|
||||
WebOb>=1.7.1 # MIT
|
||||
|
|
|
@ -19,6 +19,7 @@ from oslo_log import log
|
|||
from networking_sfc.db import sfc_db
|
||||
from networking_sfc.services.flowclassifier.drivers import base as fc_driver
|
||||
|
||||
from neutron_lib.db import model_query
|
||||
from neutron_lib.plugins import directory
|
||||
from neutronclient.common import exceptions as client_exceptions
|
||||
|
||||
|
@ -85,7 +86,7 @@ class TricircleFcDriver(fc_driver.FlowClassifierDriverBase):
|
|||
|
||||
def _get_chain_id_by_flowclassifier_id(
|
||||
self, context, fc_plugin, flowclassifier_id):
|
||||
chain_classifier_assoc = fc_plugin._model_query(
|
||||
chain_classifier_assoc = model_query.query_with_hooks(
|
||||
context, sfc_db.ChainClassifierAssoc).filter_by(
|
||||
flowclassifier_id=flowclassifier_id).first()
|
||||
if chain_classifier_assoc:
|
||||
|
|
|
@ -20,6 +20,7 @@ from networking_sfc.services.sfc.drivers import base as sfc_driver
|
|||
|
||||
from oslo_log import log
|
||||
|
||||
from neutron_lib.db import model_query
|
||||
from neutron_lib.plugins import directory
|
||||
from neutronclient.common import exceptions as client_exceptions
|
||||
|
||||
|
@ -182,7 +183,7 @@ class TricircleSfcDriver(sfc_driver.SfcDriverBase):
|
|||
net_id, t_constants.POD_NOT_SPECIFIED)
|
||||
|
||||
def _get_chain_id_by_group_id(self, context, sfc_plugin, portpairgroup_id):
|
||||
chain_group_assoc = sfc_plugin._model_query(
|
||||
chain_group_assoc = model_query.query_with_hooks(
|
||||
context, sfc_db.ChainGroupAssoc).filter_by(
|
||||
portpairgroup_id=portpairgroup_id).first()
|
||||
if chain_group_assoc:
|
||||
|
|
Loading…
Reference in New Issue