Update i18n translation for neutron.extension log msg's

Validate that hacking rules apply to directory neutron/extensions

Change-Id: Ifbc97ae2b5670fbdf22c7d0ae48f91a7776daf01
Partial-bug: #1320867
This commit is contained in:
Gary Kotton 2014-11-10 07:39:40 -08:00
parent 069aa9d1ed
commit adbc316827
2 changed files with 7 additions and 5 deletions

View 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

View 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])