From adbc316827fdd918ed21b3e3cf816129575053b0 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Mon, 10 Nov 2014 07:39:40 -0800 Subject: [PATCH] Update i18n translation for neutron.extension log msg's Validate that hacking rules apply to directory neutron/extensions Change-Id: Ifbc97ae2b5670fbdf22c7d0ae48f91a7776daf01 Partial-bug: #1320867 --- neutron/extensions/l3agentscheduler.py | 9 +++++---- neutron/hacking/checks.py | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/neutron/extensions/l3agentscheduler.py b/neutron/extensions/l3agentscheduler.py index 7f66a1a3d..74a46aeaa 100644 --- a/neutron/extensions/l3agentscheduler.py +++ b/neutron/extensions/l3agentscheduler.py @@ -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 diff --git a/neutron/hacking/checks.py b/neutron/hacking/checks.py index 47669c491..fd780fca7 100644 --- a/neutron/hacking/checks.py +++ b/neutron/hacking/checks.py @@ -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]) -- 2.45.2