From: Li Zhixin Date: Thu, 26 Nov 2015 07:19:24 +0000 (+0800) Subject: Fix alignment in message and remove unused module X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=c50f7d8a4e3cba20b043dc8c740962c83903a995;p=openstack-build%2Fneutron-build.git Fix alignment in message and remove unused module This patch fix alignment in log message and remove unused import module from oslo_log. Change-Id: I16900a79313526c214e46875fd67e735542926bc --- diff --git a/neutron/agent/l3/agent.py b/neutron/agent/l3/agent.py index 21ff7d666..94be7e0d3 100644 --- a/neutron/agent/l3/agent.py +++ b/neutron/agent/l3/agent.py @@ -643,8 +643,8 @@ class L3NATAgentWithStateReport(L3NATAgent): self.agent_state.pop('start_flag', None) except AttributeError: # This means the server does not support report_state - LOG.warn(_LW("Neutron server does not support state report." - " State report for this agent will be disabled.")) + LOG.warn(_LW("Neutron server does not support state report. " + "State report for this agent will be disabled.")) self.heartbeat.stop() return except Exception: diff --git a/neutron/scheduler/base_scheduler.py b/neutron/scheduler/base_scheduler.py index 9a7b1b7d0..561d12e38 100644 --- a/neutron/scheduler/base_scheduler.py +++ b/neutron/scheduler/base_scheduler.py @@ -17,10 +17,6 @@ import abc from operator import attrgetter import random -from oslo_log import log as logging - -LOG = logging.getLogger(__name__) - class BaseScheduler(object): """The base scheduler (agnostic to resource type). diff --git a/neutron/scheduler/l3_agent_scheduler.py b/neutron/scheduler/l3_agent_scheduler.py index 63258c2af..dfb9a6d82 100644 --- a/neutron/scheduler/l3_agent_scheduler.py +++ b/neutron/scheduler/l3_agent_scheduler.py @@ -153,8 +153,8 @@ class L3Scheduler(object): target_routers = self._get_routers_can_schedule( context, plugin, unscheduled_routers, l3_agent) if not target_routers: - LOG.warn(_LW('No routers compatible with L3 agent configuration' - ' on host %s'), host) + LOG.warn(_LW('No routers compatible with L3 agent configuration ' + 'on host %s'), host) return False self._bind_routers(context, plugin, target_routers, l3_agent) @@ -170,8 +170,8 @@ class L3Scheduler(object): l3_agents = plugin.get_l3_agents_hosting_routers( context, [sync_router['id']], admin_state_up=True) if l3_agents and not sync_router.get('distributed', False): - LOG.debug('Router %(router_id)s has already been hosted' - ' by L3 agent %(agent_id)s', + LOG.debug('Router %(router_id)s has already been hosted ' + 'by L3 agent %(agent_id)s', {'router_id': sync_router['id'], 'agent_id': l3_agents[0]['id']}) return []