Use the correct _ method from neutron_lbaas._i18n
Make use of the correct translations method. TrivialFix Change-Id: Icc43f5b514fee16a146827d11beb45e5e49d4fed
This commit is contained in:
parent
ec4499adb9
commit
e3029a51fd
@ -1,23 +0,0 @@
|
||||
# Copyright 2011 OpenStack Foundation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import gettext
|
||||
import six
|
||||
|
||||
|
||||
if six.PY2:
|
||||
gettext.install('neutron', unicode=1)
|
||||
else:
|
||||
gettext.install('neutron')
|
@ -26,6 +26,7 @@ from neutron.common import rpc as n_rpc
|
||||
from oslo_config import cfg
|
||||
from oslo_service import service
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.agent import agent_manager as manager
|
||||
from neutron_lbaas.services.loadbalancer import constants
|
||||
|
||||
|
@ -25,7 +25,7 @@ from oslo_service import loopingcall
|
||||
from oslo_service import periodic_task
|
||||
from oslo_utils import importutils
|
||||
|
||||
from neutron_lbaas._i18n import _LE, _LI
|
||||
from neutron_lbaas._i18n import _, _LE, _LI
|
||||
from neutron_lbaas.agent import agent_api
|
||||
from neutron_lbaas.drivers.common import agent_driver_base
|
||||
from neutron_lbaas.services.loadbalancer import constants as lb_const
|
||||
|
@ -19,7 +19,7 @@ from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
from neutron_lbaas._i18n import _LE
|
||||
from neutron_lbaas._i18n import _, _LE
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -33,7 +33,7 @@ from sqlalchemy import orm
|
||||
from sqlalchemy.orm import exc
|
||||
from sqlalchemy.orm import validates
|
||||
|
||||
from neutron_lbaas._i18n import _LE
|
||||
from neutron_lbaas._i18n import _, _LE
|
||||
from neutron_lbaas.extensions import loadbalancer
|
||||
from neutron_lbaas.services.loadbalancer import constants as lb_const
|
||||
|
||||
|
@ -29,6 +29,7 @@ from oslo_utils import uuidutils
|
||||
from sqlalchemy import orm
|
||||
from sqlalchemy.orm import exc
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas import agent_scheduler
|
||||
from neutron_lbaas.db.loadbalancer import models
|
||||
from neutron_lbaas.extensions import loadbalancerv2
|
||||
|
@ -22,6 +22,7 @@ import sqlalchemy as sa
|
||||
from sqlalchemy.ext import orderinglist
|
||||
from sqlalchemy import orm
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.services.loadbalancer import constants as lb_const
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ from neutron.plugins.common import constants
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging as messaging
|
||||
|
||||
from neutron_lbaas._i18n import _LW
|
||||
from neutron_lbaas._i18n import _, _LW
|
||||
from neutron_lbaas.db.loadbalancer import loadbalancer_dbv2
|
||||
from neutron_lbaas.db.loadbalancer import models as db_models
|
||||
from neutron_lbaas.services.loadbalancer import data_models
|
||||
|
@ -20,6 +20,7 @@ from oslo_config import cfg
|
||||
import oslo_messaging as messaging
|
||||
from oslo_utils import importutils
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.drivers.common import agent_callbacks
|
||||
from neutron_lbaas.drivers import driver_base
|
||||
from neutron_lbaas.extensions import lbaas_agentschedulerv2
|
||||
|
@ -27,7 +27,7 @@ from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
from neutron_lbaas._i18n import _LI, _LE, _LW
|
||||
from neutron_lbaas._i18n import _, _LI, _LE, _LW
|
||||
from neutron_lbaas.agent import agent_device_driver
|
||||
from neutron_lbaas.services.loadbalancer import constants as lb_const
|
||||
from neutron_lbaas.services.loadbalancer import data_models
|
||||
|
@ -13,6 +13,9 @@
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
|
||||
|
||||
KEMP_OPTS = [
|
||||
cfg.StrOpt('lm_address', default='192.168.0.1',
|
||||
help=_('Management address of the LoadMaster appliance.')),
|
||||
|
@ -23,7 +23,7 @@ from neutron import context as ncontext
|
||||
from neutron.plugins.common import constants
|
||||
from oslo_service import service
|
||||
|
||||
from neutron_lbaas._i18n import _LE
|
||||
from neutron_lbaas._i18n import _, _LE
|
||||
from neutron_lbaas.drivers import driver_base
|
||||
from neutron_lbaas.drivers.driver_mixins import BaseManagerMixin
|
||||
from neutron_lbaas.services.loadbalancer.drivers.netscaler import ncc_client
|
||||
|
@ -23,6 +23,7 @@ from oslo_serialization import jsonutils
|
||||
from oslo_utils import excutils
|
||||
import requests
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.common import keystone
|
||||
from neutron_lbaas.drivers import driver_base
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
from oslo_config import cfg
|
||||
from oslo_log import helpers as log_helpers
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.drivers import driver_base
|
||||
|
||||
|
||||
|
@ -25,6 +25,7 @@ from neutron.plugins.common import constants as plugin_const
|
||||
from neutron import policy
|
||||
from neutron import wsgi
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.extensions import loadbalancer
|
||||
|
||||
LOADBALANCER_POOL = 'loadbalancer-pool'
|
||||
|
@ -24,6 +24,7 @@ from neutron.plugins.common import constants as plugin_const
|
||||
from neutron import policy
|
||||
from neutron import wsgi
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.extensions import loadbalancer
|
||||
from neutron_lbaas.extensions import loadbalancerv2
|
||||
from neutron_lbaas.services.loadbalancer import constants as lb_const
|
||||
|
@ -26,6 +26,8 @@ from neutron.common import exceptions as nexception
|
||||
from neutron import manager
|
||||
from neutron.plugins.common import constants
|
||||
from neutron.services import service_base
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.extensions import loadbalancerv2
|
||||
from neutron_lbaas.services.loadbalancer import constants as lb_const
|
||||
|
||||
|
@ -29,6 +29,7 @@ from neutron import manager
|
||||
from neutron.plugins.common import constants
|
||||
from neutron.services import service_base
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.services.loadbalancer import constants as lb_const
|
||||
|
||||
LOADBALANCERV2_PREFIX = "/lbaas"
|
||||
|
@ -24,6 +24,7 @@ from neutron.common import rpc as n_rpc
|
||||
from oslo_config import cfg
|
||||
from oslo_service import service
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.services.loadbalancer.agent import agent_manager as manager
|
||||
from neutron_lbaas.services.loadbalancer import constants as l_const
|
||||
|
||||
|
@ -25,7 +25,7 @@ from oslo_service import loopingcall
|
||||
from oslo_service import periodic_task
|
||||
from oslo_utils import importutils
|
||||
|
||||
from neutron_lbaas._i18n import _LE, _LI
|
||||
from neutron_lbaas._i18n import _, _LE, _LI
|
||||
from neutron_lbaas.services.loadbalancer.agent import agent_api
|
||||
from neutron_lbaas.services.loadbalancer import constants as l_const
|
||||
|
||||
|
@ -26,7 +26,7 @@ from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from oslo_utils import importutils
|
||||
|
||||
from neutron_lbaas._i18n import _LW
|
||||
from neutron_lbaas._i18n import _, _LW
|
||||
from neutron_lbaas.db.loadbalancer import loadbalancer_db
|
||||
from neutron_lbaas.extensions import lbaas_agentscheduler
|
||||
from neutron_lbaas.services.loadbalancer import constants as l_const
|
||||
|
@ -21,6 +21,7 @@ from neutron.common import utils as n_utils
|
||||
from neutron.plugins.common import constants as plugin_constants
|
||||
from oslo_config import cfg
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.common import cert_manager
|
||||
from neutron_lbaas.common.tls_utils import cert_parser
|
||||
from neutron_lbaas.services.loadbalancer import constants
|
||||
|
@ -26,7 +26,7 @@ from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
from neutron_lbaas._i18n import _LE, _LW
|
||||
from neutron_lbaas._i18n import _, _LE, _LW
|
||||
from neutron_lbaas.services.loadbalancer.agent import agent_device_driver
|
||||
from neutron_lbaas.services.loadbalancer import constants as lb_const
|
||||
from neutron_lbaas.services.loadbalancer.drivers.haproxy import cfg as hacfg
|
||||
|
@ -19,7 +19,7 @@ from neutron.common import exceptions as n_exc
|
||||
from oslo_log import log as logging
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from neutron_lbaas._i18n import _LE, _LI
|
||||
from neutron_lbaas._i18n import _, _LE, _LI
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -17,7 +17,7 @@ from neutron.plugins.common import constants
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron_lbaas._i18n import _LI
|
||||
from neutron_lbaas._i18n import _, _LI
|
||||
from neutron_lbaas.db.loadbalancer import loadbalancer_db
|
||||
from neutron_lbaas.services.loadbalancer.drivers import abstract_driver
|
||||
from neutron_lbaas.services.loadbalancer.drivers.netscaler import ncc_client
|
||||
|
@ -33,7 +33,7 @@ from oslo_serialization import jsonutils
|
||||
from oslo_utils import excutils
|
||||
from six.moves import queue as Queue
|
||||
|
||||
from neutron_lbaas._i18n import _LE, _LI, _LW
|
||||
from neutron_lbaas._i18n import _, _LE, _LI, _LW
|
||||
from neutron_lbaas.db.loadbalancer import loadbalancer_db as lb_db
|
||||
from neutron_lbaas.extensions import loadbalancer
|
||||
from neutron_lbaas.services.loadbalancer.drivers import abstract_driver
|
||||
|
@ -15,6 +15,8 @@
|
||||
|
||||
from neutron.common import exceptions
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
|
||||
|
||||
class RadwareLBaasException(exceptions.NeutronException):
|
||||
message = _('An unknown exception occurred in Radware LBaaS provider.')
|
||||
|
@ -22,6 +22,7 @@ from six.moves.urllib import error
|
||||
from six.moves.urllib import request as urllib2
|
||||
from tempest_lib import exceptions as lib_exc
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.tests.tempest.lib.common import commands
|
||||
from neutron_lbaas.tests.tempest.lib import config
|
||||
from neutron_lbaas.tests.tempest.lib import exceptions
|
||||
|
@ -32,6 +32,7 @@ from neutron.tests.unit.db import test_db_base_plugin_v2
|
||||
import testtools
|
||||
import webob.exc
|
||||
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.db.loadbalancer import loadbalancer_db as ldb
|
||||
import neutron_lbaas.extensions
|
||||
from neutron_lbaas.extensions import loadbalancer
|
||||
|
@ -34,6 +34,7 @@ import testtools
|
||||
import webob.exc
|
||||
|
||||
from neutron import manager
|
||||
from neutron_lbaas._i18n import _
|
||||
from neutron_lbaas.common.cert_manager import cert_manager
|
||||
from neutron_lbaas.common import exceptions
|
||||
from neutron_lbaas.db.loadbalancer import models
|
||||
|
Loading…
Reference in New Issue
Block a user