From: armando-migliaccio Date: Mon, 27 Jul 2015 21:11:46 +0000 (-0700) Subject: Remove implicit registration of *-aas service providers X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9022fb1ae8f90df59c4da64450eb96de8c011715;p=openstack-build%2Fneutron-build.git Remove implicit registration of *-aas service providers 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 --- diff --git a/doc/source/devref/contribute.rst b/doc/source/devref/contribute.rst index 1ba7adaff..4cde3d73f 100644 --- a/doc/source/devref/contribute.rst +++ b/doc/source/devref/contribute.rst @@ -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=::[: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 ~~~~~~~~~~~~~~~~~ diff --git a/neutron/db/servicetype_db.py b/neutron/db/servicetype_db.py index 0ef4f409a..a717a27d0 100644 --- a/neutron/db/servicetype_db.py +++ b/neutron/db/servicetype_db.py @@ -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.""" diff --git a/setup.cfg b/setup.cfg index 5f3de4db1..04896f10a 100644 --- 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 =