From 8d1c1c4a32c95396e6b8f5f32f229b74fbb105e1 Mon Sep 17 00:00:00 2001 From: Jakub Libosvar Date: Wed, 17 Dec 2014 16:56:36 +0100 Subject: [PATCH] Backward compatibility for fwaas Fwaas driver class is changed to one from this repo in case it attempts to be loaded from neutron repo. This change depends on I76af175c4387326a4e5ff95c2f15d8b866dedab3 Change-Id: If850adb3ec9db0a9ff0d43cd7445264c168d241c Closes-Bug: 1401895 --- .../firewall/agents/l3reference/firewall_l3_agent.py | 6 +++++- setup.cfg | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/neutron_fwaas/services/firewall/agents/l3reference/firewall_l3_agent.py b/neutron_fwaas/services/firewall/agents/l3reference/firewall_l3_agent.py index 345c2ed2a..70e37ed08 100644 --- a/neutron_fwaas/services/firewall/agents/l3reference/firewall_l3_agent.py +++ b/neutron_fwaas/services/firewall/agents/l3reference/firewall_l3_agent.py @@ -24,10 +24,13 @@ from neutron.extensions import firewall as fw_ext from neutron.i18n import _LE from neutron.openstack.common import log as logging from neutron.plugins.common import constants +from neutron.services import provider_configuration as provconf from neutron_fwaas.services.firewall.agents import firewall_agent_api as api LOG = logging.getLogger(__name__) +FIREWALL_DRIVERS = 'firewall_drivers' + class FWaaSL3PluginApi(api.FWaaSPluginApiMixin): """Agent side of the FWaaS agent to FWaaS Plugin RPC API.""" @@ -55,7 +58,8 @@ class FWaaSL3AgentRpcCallback(api.FWaaSAgentRpcCallbackMixin): def __init__(self, conf): LOG.debug("Initializing firewall agent") self.conf = conf - fwaas_driver_class_path = cfg.CONF.fwaas.driver + fwaas_driver_class_path = provconf.get_provider_driver_class( + cfg.CONF.fwaas.driver, FIREWALL_DRIVERS) self.fwaas_enabled = cfg.CONF.fwaas.enabled # None means l3-agent has no information on the server diff --git a/setup.cfg b/setup.cfg index 5f70a39a8..e5d24416c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,6 +28,12 @@ data_files = setup-hooks = pbr.hooks.setup_hook +[entry_points] +firewall_drivers = + # These are for backwards compat with Juno firewall service provider configuration values + neutron.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver = neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas:IptablesFwaasDriver + neutron.services.firewall.drivers.varmour.varmour_fwaas.vArmourFwaasDriver = neutron_fwaas.services.firewall.drivers.varmour.varmour_fwaas:vArmourFwaasDriver + [build_sphinx] all_files = 1 build-dir = doc/build