]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove implicit registration of *-aas service providers
authorarmando-migliaccio <armamig@gmail.com>
Mon, 27 Jul 2015 21:11:46 +0000 (14:11 -0700)
committerArmando Migliaccio <armamig@gmail.com>
Wed, 2 Sep 2015 16:13:59 +0000 (16:13 +0000)
Implicit registration can be dropped when explicit registration
for load balancer and vpn is implemented. Firewall does not
use service providers and the ServiceTypeManager, so the
precautionary step can be dropped altogether.

Support for configuring providers via the service_providers section
in neutron.conf, is no longer available, hence clear the stale
entry points.

DocImpact

Closes-bug: #1473110

Change-Id: I5e1d254b9a3a24121d9e9d3cb82f877d44079296

doc/source/devref/contribute.rst
neutron/db/servicetype_db.py
setup.cfg

index 1ba7adaffefe83120db6d9291a330d3c4defe9ab..4cde3d73fbeb25286a5c9c3d4e317d4d4b45cdfc 100644 (file)
@@ -506,6 +506,28 @@ Extensions can be loaded in two ways:
    variable is commented.
 
 
+Service Providers
+~~~~~~~~~~~~~~~~~
+
+If your project uses service provider(s) the same way VPNAAS and LBAAS do, you
+specify your service provider in your ``project_name.conf`` file like so::
+
+    [service_providers]
+    # Must be in form:
+    # service_provider=<service_type>:<name>:<driver>[:default][,...]
+
+In order for Neutron to load this correctly, make sure you do the following in
+your code::
+
+    from neutron.db import servicetype_db
+    service_type_manager = servicetype_db.ServiceTypeManager.get_instance()
+    service_type_manager.add_provider_configuration(
+        YOUR_SERVICE_TYPE,
+        pconf.ProviderConfiguration(YOUR_SERVICE_MODULE))
+
+This is typically required when you instantiate your service plugin class.
+
+
 Interface Drivers
 ~~~~~~~~~~~~~~~~~
 
index 0ef4f409a4aa929b6b9c4184b799556d7f56aecf..a717a27d0820351b0e9dcc74612a738ffe5fe9d4 100644 (file)
@@ -45,16 +45,6 @@ class ServiceTypeManager(object):
 
     def __init__(self):
         self.config = {}
-        # TODO(armax): remove these as soon as *-aaS start using
-        # the newly introduced add_provider_configuration API
-        self.config['LOADBALANCER'] = (
-            pconf.ProviderConfiguration('neutron_lbaas'))
-        self.config['LOADBALANCERV2'] = (
-            pconf.ProviderConfiguration('neutron_lbaas'))
-        self.config['FIREWALL'] = (
-            pconf.ProviderConfiguration('neutron_fwaas'))
-        self.config['VPN'] = (
-            pconf.ProviderConfiguration('neutron_vpnaas'))
 
     def add_provider_configuration(self, service_type, configuration):
         """Add or update the provider configuration for the service type."""
index 5f3de4db123ca61bdd6a282800aadde2c4a9cfd1..04896f10aebe8e8bec73793d54e3dbcb02002be2 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -127,19 +127,6 @@ neutron.service_plugins =
     neutron.services.vpn.plugin.VPNDriverPlugin = neutron_vpnaas.services.vpn.plugin:VPNDriverPlugin
     ibm_l3 = neutron.services.l3_router.l3_sdnve:SdnveL3ServicePlugin
     qos = neutron.services.qos.qos_plugin:QoSPlugin
-neutron.service_providers =
-    # 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
-    # These are for backwards compat with Juno loadbalancer service provider configuration values
-    neutron.services.loadbalancer.drivers.a10networks.driver_v1.ThunderDriver = neutron_lbaas.services.loadbalancer.drivers.a10networks.driver_v1:ThunderDriver
-    neutron.services.loadbalancer.drivers.embrane.driver.EmbraneLbaas = neutron_lbaas.services.loadbalancer.drivers.embrane.driver:EmbraneLbaas
-    neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver = neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver:HaproxyOnHostPluginDriver
-    neutron.services.loadbalancer.drivers.netscaler.netscaler_driver.NetScalerPluginDriver = neutron_lbaas.services.loadbalancer.drivers.netscaler.netscaler_driver:NetScalerPluginDriver
-    neutron.services.loadbalancer.drivers.radware.driver.LoadBalancerDriver = neutron_lbaas.services.loadbalancer.drivers.radware.driver:LoadBalancerDriver
-    # These are for backwards compat with Juno vpnaas service provider configuration values
-    neutron.services.vpn.service_drivers.cisco_ipsec.CiscoCsrIPsecVPNDriver = neutron_vpnaas.services.vpn.service_drivers.cisco_ipsec:CiscoCsrIPsecVPNDriver
-    neutron.services.vpn.service_drivers.ipsec.IPsecVPNDriver = neutron_vpnaas.services.vpn.service_drivers.ipsec:IPsecVPNDriver
 neutron.qos.notification_drivers =
     message_queue = neutron.services.qos.notification_drivers.message_queue:RpcQosServiceNotificationDriver
 neutron.ml2.type_drivers =