firewall: don't warn about a driver that does not accept bridge

Drivers that do not need the bridge parameter are safe to ignore it.
Actually, the base abstract interface for those drivers does not allow
to pass the new parameter.

Ideally, the base class __init__ signature would change to accept the
argument, but we can't do it without breaking API.

So instead, just handle both types of drivers - those that accept the
additional argument, and those that don't. And don't assume the latter
are somehow wrong.

Change-Id: Iceee46f63669b28e3a34d207216d864f1bfa5cf8
Closes-Bug: #1561243
This commit is contained in:
Ihar Hrachyshka 2016-03-24 16:16:17 +01:00
parent b6b26b8b9a
commit 193aa35325

@ -103,12 +103,7 @@ class SecurityGroupAgentRpc(object):
try:
self.firewall = firewall_class(
integration_bridge=integration_bridge)
except TypeError as e:
LOG.warning(_LW("Firewall driver %(fw_driver)s doesn't accept "
"integration_bridge parameter in __init__(): "
"%(err)s"),
{'fw_driver': firewall_driver,
'err': e})
except TypeError:
self.firewall = firewall_class()
# The following flag will be set to true if port filter must not be
# applied as soon as a rule or membership notification is received