Browse Source

Fix resource_filter.bind method that was changed in neutron

This happened in [0], we need to add a partial workaround until a new
neutron release is made.

[0] https://review.opendev.org/288271

Change-Id: I5661e8689d8e3ea861fdd0393e6f25c42cd324c3
changes/88/693688/1
Jens Harbott 2 years ago
parent
commit
e2d4cede45
  1. 5
      neutron_dynamic_routing/services/bgp/scheduler/bgp_dragent_scheduler.py

5
neutron_dynamic_routing/services/bgp/scheduler/bgp_dragent_scheduler.py

@ -38,7 +38,7 @@ BGP_SPEAKER_PER_DRAGENT = 1
class BgpDrAgentFilter(base_resource_filter.BaseResourceFilter):
def bind(self, context, agents, bgp_speaker_id):
def bind(self, context, agents, bgp_speaker_id, force_scheduling=False):
"""Bind the BgpSpeaker to a BgpDrAgent."""
bound_agents = agents[:]
for agent in agents:
@ -61,6 +61,9 @@ class BgpDrAgentFilter(base_resource_filter.BaseResourceFilter):
'agent_id': agent_id})
super(BgpDrAgentFilter, self).bind(context, bound_agents,
bgp_speaker_id)
# TODO(frickler): once neutron is released, switch to this
# super(BgpDrAgentFilter, self).bind(context, bound_agents,
# bgp_speaker_id, force_scheduling)
def filter_agents(self, plugin, context, bgp_speaker):
"""Return the agents that can host the BgpSpeaker."""

Loading…
Cancel
Save