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: I8ff41c9d914b8329e4fca90de8a9ef9f41ccdcde
This commit is contained in:
parent
5ffd2b759a
commit
9d44af10b3
@ -53,7 +53,7 @@ msgpack==0.5.6
|
||||
munch==2.2.0
|
||||
netaddr==0.7.19
|
||||
netifaces==0.10.6
|
||||
neutron-lib==1.18.0
|
||||
neutron-lib==1.20.0
|
||||
openstacksdk==0.12.0
|
||||
os-client-config==1.29.0
|
||||
os-service-types==1.2.0
|
||||
|
@ -21,6 +21,7 @@ from sqlalchemy.orm import exc
|
||||
from neutron.db import common_db_mixin as base_db
|
||||
from neutron_lib import constants
|
||||
from neutron_lib.db import model_base
|
||||
from neutron_lib.db import model_query
|
||||
from neutron_lib.plugins import directory
|
||||
from neutron_taas.extensions import taas
|
||||
from oslo_config import cfg
|
||||
@ -91,7 +92,7 @@ class Taas_db_Mixin(taas.TaasPluginBase, base_db.CommonDbMixin):
|
||||
|
||||
def _get_tap_id_association(self, context, tap_service_id):
|
||||
try:
|
||||
query = self._model_query(context, TapIdAssociation)
|
||||
query = model_query.query_with_hooks(context, TapIdAssociation)
|
||||
return query.filter(TapIdAssociation.tap_service_id ==
|
||||
tap_service_id).one()
|
||||
except exc.NoResultFound:
|
||||
|
@ -5,7 +5,7 @@
|
||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||
Babel!=2.4.0,>=2.3.4 # BSD
|
||||
neutron>=12.0.0 # Apache-2.0
|
||||
neutron-lib>=1.18.0 # Apache-2.0
|
||||
neutron-lib>=1.20.0 # Apache-2.0
|
||||
|
||||
# Opt-in for neutron-lib consumption patches
|
||||
# http://lists.openstack.org/pipermail/openstack-dev/2018-September/135063.html
|
||||
|
Loading…
Reference in New Issue
Block a user