From: Hong Hui Xiao Date: Sun, 15 Nov 2015 13:49:13 +0000 (-0500) Subject: Remove the useless l3plugin check in l3_rpc.py X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=4676c55f9d29e5d976951b857ca21e0b994e213c;p=openstack-build%2Fneutron-build.git Remove the useless l3plugin check in l3_rpc.py Without "L3_ROUTER_NAT" in neutron's service_plugins, l3_rpc will fail when getting l3plugin. So, remove the useless "if" block here. Change-Id: I56f417e5723ed40c70a186394de0bfcff696e469 Closes-Bug: #1514144 --- diff --git a/neutron/api/rpc/handlers/l3_rpc.py b/neutron/api/rpc/handlers/l3_rpc.py index 9727e00f4..ac87c3d71 100644 --- a/neutron/api/rpc/handlers/l3_rpc.py +++ b/neutron/api/rpc/handlers/l3_rpc.py @@ -26,7 +26,6 @@ from neutron import context as neutron_context from neutron.db import api as db_api from neutron.extensions import l3 from neutron.extensions import portbindings -from neutron.i18n import _LE from neutron import manager from neutron.plugins.common import constants as plugin_constants @@ -73,12 +72,8 @@ class L3RpcCallback(object): router_ids = kwargs.get('router_ids') host = kwargs.get('host') context = neutron_context.get_admin_context() - if not self.l3plugin: - routers = {} - LOG.error(_LE('No plugin for L3 routing registered! Will reply ' - 'to l3 agent with empty router dictionary.')) - elif utils.is_extension_supported( - self.l3plugin, constants.L3_AGENT_SCHEDULER_EXT_ALIAS): + if utils.is_extension_supported( + self.l3plugin, constants.L3_AGENT_SCHEDULER_EXT_ALIAS): if cfg.CONF.router_auto_schedule: self.l3plugin.auto_schedule_routers(context, host, router_ids) routers = (