Merge "use neutron-lib for _model_query"

This commit is contained in:
Zuul 2018-12-08 05:19:03 +00:00 committed by Gerrit Code Review
commit 66e13d17e7
3 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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()

View File

@ -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