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: I3f2711239772a41ccb6a0d7eb19f11326f125e86
This commit is contained in:
parent
2a4062f3c1
commit
8170e51adb
|
@ -53,7 +53,7 @@ munch==2.1.0
|
|||
netaddr==0.7.18
|
||||
netifaces==0.10.4
|
||||
neutron==13.0.0.0b2
|
||||
neutron-lib==1.18.0
|
||||
neutron-lib==1.20.0
|
||||
openstackdocstheme==1.18.1
|
||||
openstacksdk==0.11.2
|
||||
os-client-config==1.28.0
|
||||
|
|
|
@ -28,6 +28,7 @@ from neutron.plugins.ml2 import models as ml2_models
|
|||
from neutron_lib.api import validators
|
||||
from neutron_lib import constants as lib_consts
|
||||
from neutron_lib.db import model_base
|
||||
from neutron_lib.db import model_query
|
||||
from neutron_lib import exceptions as n_exc
|
||||
from neutron_lib.exceptions import l3 as l3_exc
|
||||
from oslo_db import exception as oslo_db_exc
|
||||
|
@ -433,14 +434,14 @@ class BgpDbMixin(common_db.CommonDbMixin):
|
|||
|
||||
def _get_bgp_speaker_peer_binding(self, context,
|
||||
bgp_speaker_id, bgp_peer_id):
|
||||
query = self._model_query(context, BgpSpeakerPeerBinding)
|
||||
query = model_query.query_with_hooks(context, BgpSpeakerPeerBinding)
|
||||
return query.filter(
|
||||
BgpSpeakerPeerBinding.bgp_speaker_id == bgp_speaker_id,
|
||||
BgpSpeakerPeerBinding.bgp_peer_id == bgp_peer_id).one()
|
||||
|
||||
def _get_bgp_speaker_network_binding(self, context,
|
||||
bgp_speaker_id, network_id):
|
||||
query = self._model_query(context, BgpSpeakerNetworkBinding)
|
||||
query = model_query.query_with_hooks(context, BgpSpeakerNetworkBinding)
|
||||
return query.filter(
|
||||
BgpSpeakerNetworkBinding.bgp_speaker_id == bgp_speaker_id,
|
||||
BgpSpeakerNetworkBinding.network_id == network_id).one()
|
||||
|
|
|
@ -9,7 +9,7 @@ netaddr>=0.7.18 # BSD
|
|||
SQLAlchemy>=1.2.0 # MIT
|
||||
alembic>=0.8.10 # MIT
|
||||
six>=1.10.0 # MIT
|
||||
neutron-lib>=1.18.0 # Apache-2.0
|
||||
neutron-lib>=1.20.0 # Apache-2.0
|
||||
oslo.config>=5.2.0 # Apache-2.0
|
||||
oslo.db>=4.27.0 # Apache-2.0
|
||||
oslo.log>=3.36.0 # Apache-2.0
|
||||
|
|
Loading…
Reference in New Issue