From: Kevin Benton Date: Thu, 12 Jun 2014 09:15:27 +0000 (-0700) Subject: Big Switch: Remove unnecessary initialization code X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=24a19bfd362996cd9833a167d6eb86fdcf743b75;p=openstack-build%2Fneutron-build.git Big Switch: Remove unnecessary initialization code Removes a server_timeout parameter that was never set by anything in the Big Switch plugin and the ML2 driver. Also eliminates an __init__ method that didn't do anything except incorrectly log an unset server pool warning before the inheriting class setup the server pool. Closes-Bug: #1331249 Change-Id: I77dd22295305b96d4702f1ea0e319dc5f82c71a8 --- diff --git a/neutron/plugins/bigswitch/plugin.py b/neutron/plugins/bigswitch/plugin.py index 6d25827c0..9249f5d6b 100644 --- a/neutron/plugins/bigswitch/plugin.py +++ b/neutron/plugins/bigswitch/plugin.py @@ -168,13 +168,6 @@ class NeutronRestProxyV2Base(db_base_plugin_v2.NeutronDbPluginV2, supported_extension_aliases = ["binding"] servers = None - def __init__(self, server_timeout=None): - super(NeutronRestProxyV2Base, self).__init__() - # This base class is not intended to be instantiated directly. - # Extending class should set ServerPool. - if not self.servers: - LOG.warning(_("ServerPool not set!")) - def _get_all_data(self, get_ports=True, get_floating_ips=True, get_routers=True): admin_context = qcontext.get_admin_context() @@ -474,7 +467,7 @@ class NeutronRestProxyV2(NeutronRestProxyV2Base, self._aliases = aliases return self._aliases - def __init__(self, server_timeout=None): + def __init__(self): super(NeutronRestProxyV2, self).__init__() LOG.info(_('NeutronRestProxy: Starting plugin. Version=%s'), version.version_string_with_vcs()) @@ -487,7 +480,7 @@ class NeutronRestProxyV2(NeutronRestProxyV2Base, self.add_meta_server_route = cfg.CONF.RESTPROXY.add_meta_server_route # init network ctrl connections - self.servers = servermanager.ServerPool(server_timeout) + self.servers = servermanager.ServerPool() self.servers.get_topo_function = self._get_all_data self.servers.get_topo_function_args = {'get_ports': True, 'get_floating_ips': True, diff --git a/neutron/plugins/ml2/drivers/mech_bigswitch/driver.py b/neutron/plugins/ml2/drivers/mech_bigswitch/driver.py index b3acb6671..faab0a26f 100644 --- a/neutron/plugins/ml2/drivers/mech_bigswitch/driver.py +++ b/neutron/plugins/ml2/drivers/mech_bigswitch/driver.py @@ -43,7 +43,7 @@ class BigSwitchMechanismDriver(plugin.NeutronRestProxyV2Base, operations to the Big Switch Controller. """ - def initialize(self, server_timeout=None): + def initialize(self): LOG.debug(_('Initializing driver')) # register plugin config opts @@ -53,7 +53,7 @@ class BigSwitchMechanismDriver(plugin.NeutronRestProxyV2Base, self.native_bulk_support = False # init network ctrl connections - self.servers = servermanager.ServerPool(server_timeout) + self.servers = servermanager.ServerPool() self.servers.get_topo_function = self._get_all_data self.servers.get_topo_function_args = {'get_ports': True, 'get_floating_ips': False,