]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix alignment in message and remove unused module
authorLi Zhixin <lizhixin@awcloud.com>
Thu, 26 Nov 2015 07:19:24 +0000 (15:19 +0800)
committerZhixin Li <lizhixin@awcloud.com>
Thu, 26 Nov 2015 08:16:45 +0000 (08:16 +0000)
This patch fix alignment in log message and remove
unused import module from oslo_log.

Change-Id: I16900a79313526c214e46875fd67e735542926bc

neutron/agent/l3/agent.py
neutron/scheduler/base_scheduler.py
neutron/scheduler/l3_agent_scheduler.py

index 21ff7d66642e51e9a8ddc199242aab4fe6a0dcc3..94be7e0d34829e2152b72c33e81772beb80c61a8 100644 (file)
@@ -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:
index 9a7b1b7d0f1f2730bf19625028cef355c0ca4fa9..561d12e38c906af69549a634f12d1161b6ab9cc1 100644 (file)
@@ -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).
index 63258c2afba5ad8d3ae6a21633d78a2c2643c552..dfb9a6d8287482408130cad1b1bf041178f28b0b 100644 (file)
@@ -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 []