Skip to content

Commit

Permalink
Merge "Remove implicit registration of *-aas service providers"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Sep 5, 2015
2 parents 84497a6 + 9022fb1 commit 9ace007
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
22 changes: 22 additions & 0 deletions doc/source/devref/contribute.rst
Expand Up @@ -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
~~~~~~~~~~~~~~~~~

Expand Down
10 changes: 0 additions & 10 deletions neutron/db/servicetype_db.py
Expand Up @@ -45,16 +45,6 @@ def get_instance(cls):

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."""
Expand Down
13 changes: 0 additions & 13 deletions setup.cfg
Expand Up @@ -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 =
Expand Down

0 comments on commit 9ace007

Please sign in to comment.