Make "phys_brs" argument in OVSAgentExtensionAPI optional

In [1], a new init parameter was introduced in the class
OVSAgentExtensionAPI. This change in the extension API can break
backwards compatibility with other projects (networking_sfc and
bagpipe are affected).

Because this parameter is needed only in qos_driver extension when
calling OVSAgentExtensionAPI.request_phy_brs() (to retrieve the
physical bridges list), we can make this new parameter optional not
to break other stadium projects. When the OVS it's initialized
(in-tree agent), the extension is called with the three needed
parameters.

[1] https://review.openstack.org/#/c/406841/22/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_agent_extension_api.py@43

Change-Id: I31d1a31a935fdcdd12e13e1bc58f7c5f640ca092
Closes-Bug: #1818693
changes/64/641064/1
Rodolfo Alonso Hernandez 4 years ago
parent 8b7370a934
commit f08de5cbe9
  1. 4
      neutron/plugins/ml2/drivers/openvswitch/agent/ovs_agent_extension_api.py

@ -40,11 +40,11 @@ class OVSAgentExtensionAPI(object):
method which has been added to the AgentExtension class.
'''
def __init__(self, int_br, tun_br, phys_brs):
def __init__(self, int_br, tun_br, phys_brs=None):
super(OVSAgentExtensionAPI, self).__init__()
self.br_int = int_br
self.br_tun = tun_br
self.br_phys = phys_brs
self.br_phys = phys_brs or {}
def request_int_br(self):
"""Allows extensions to request an integration bridge to use for

Loading…
Cancel
Save