]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Update i18n translation for neutron.extension log msg's
authorGary Kotton <gkotton@vmware.com>
Mon, 10 Nov 2014 15:39:40 +0000 (07:39 -0800)
committerGary Kotton <gkotton@vmware.com>
Sat, 15 Nov 2014 08:42:43 +0000 (00:42 -0800)
Validate that hacking rules apply to directory neutron/extensions

Change-Id: Ifbc97ae2b5670fbdf22c7d0ae48f91a7776daf01
Partial-bug: #1320867

neutron/extensions/l3agentscheduler.py
neutron/hacking/checks.py

index 7f66a1a3d7da238804ba20baee30325976aee657..74a46aeaa4c36b2b2d92d2bff30c8c4003f80a3f 100644 (file)
@@ -25,6 +25,7 @@ from neutron.common import exceptions
 from neutron.common import rpc as n_rpc
 from neutron.extensions import agent
 from neutron import manager
+from neutron.openstack.common.gettextutils import _LE
 from neutron.openstack.common import log as logging
 from neutron.plugins.common import constants as service_constants
 from neutron import policy
@@ -45,8 +46,8 @@ class RouterSchedulerController(wsgi.Controller):
         plugin = manager.NeutronManager.get_service_plugins().get(
             service_constants.L3_ROUTER_NAT)
         if not plugin:
-            LOG.error(_('No plugin for L3 routing registered to handle '
-                        'router scheduling'))
+            LOG.error(_LE('No plugin for L3 routing registered to handle '
+                          'router scheduling'))
             msg = _('The resource could not be found.')
             raise webob.exc.HTTPNotFound(msg)
         return plugin
@@ -88,8 +89,8 @@ class L3AgentsHostingRouterController(wsgi.Controller):
         plugin = manager.NeutronManager.get_service_plugins().get(
             service_constants.L3_ROUTER_NAT)
         if not plugin:
-            LOG.error(_('No plugin for L3 routing registered to handle '
-                        'router scheduling'))
+            LOG.error(_LE('No plugin for L3 routing registered to handle '
+                          'router scheduling'))
             msg = _('The resource could not be found.')
             raise webob.exc.HTTPNotFound(msg)
         return plugin
index 47669c491ae76b67ff1b533052d58f6964c6b6f9..fd780fca7870655e397fd71def94536a10ceff40 100644 (file)
@@ -46,7 +46,8 @@ def _directory_to_check_translation(filename):
     # series will remove this and the entire code base will be validated.
     dirs = ["neutron/agent",
             "neutron/cmd",
-            "neutron/db"]
+            "neutron/db",
+            "neutron/extensions"]
     return any([dir in filename for dir in dirs])