Remove reference to neutron.i18n
Partially-implements: bp neutron-lib Change-Id: I213c83951c7c61b2365da96da1bc8251eed9d0c2changes/74/357874/5
parent
e953b29522
commit
e749b9a9fa
|
@ -0,0 +1,42 @@
|
|||
# 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 oslo_i18n
|
||||
|
||||
DOMAIN = "networking_arista"
|
||||
|
||||
_translators = oslo_i18n.TranslatorFactory(domain=DOMAIN)
|
||||
|
||||
# The primary translation function using the well-known name "_"
|
||||
_ = _translators.primary
|
||||
|
||||
# The contextual translation function using the name "_C"
|
||||
_C = _translators.contextual_form
|
||||
|
||||
# The plural translation function using the name "_P"
|
||||
_P = _translators.plural_form
|
||||
|
||||
# Translators for log levels.
|
||||
#
|
||||
# The abbreviated names are meant to reflect the usual use of a short
|
||||
# name like '_'. The "L" is for "log" and the other letter comes from
|
||||
# the level.
|
||||
_LI = _translators.log_info
|
||||
_LW = _translators.log_warning
|
||||
_LE = _translators.log_error
|
||||
_LC = _translators.log_critical
|
||||
|
||||
|
||||
def get_available_languages():
|
||||
return oslo_i18n.get_available_languages(DOMAIN)
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
from oslo_config import cfg
|
||||
|
||||
from networking_arista._i18n import _
|
||||
|
||||
|
||||
# Arista ML2 Mechanism driver specific configuration knobs.
|
||||
#
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
from neutron_lib import exceptions
|
||||
|
||||
from networking_arista._i18n import _
|
||||
|
||||
|
||||
class AristaRpcError(exceptions.NeutronException):
|
||||
message = _('%(msg)s')
|
||||
|
|
|
@ -20,8 +20,7 @@ import jsonrpclib
|
|||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron._i18n import _LI
|
||||
|
||||
from networking_arista._i18n import _, _LI
|
||||
from networking_arista.common import exceptions as arista_exc
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -20,8 +20,6 @@ from oslo_log import helpers as log_helpers
|
|||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
from neutron._i18n import _LE
|
||||
from neutron._i18n import _LI
|
||||
from neutron.api.rpc.agentnotifiers import l3_rpc_agent_api
|
||||
from neutron.api.rpc.handlers import l3_rpc
|
||||
from neutron.common import constants as n_const
|
||||
|
@ -35,6 +33,7 @@ from neutron.db import l3_gwmode_db
|
|||
from neutron.plugins.common import constants
|
||||
from neutron.plugins.ml2.driver_context import NetworkContext # noqa
|
||||
|
||||
from networking_arista._i18n import _LE, _LI
|
||||
from networking_arista.common import db_lib
|
||||
from networking_arista.l3Plugin import arista_l3_driver
|
||||
|
||||
|
|
|
@ -26,11 +26,9 @@ from oslo_utils import excutils
|
|||
import requests
|
||||
from six import add_metaclass
|
||||
|
||||
from neutron._i18n import _LE
|
||||
from neutron._i18n import _LI
|
||||
from neutron._i18n import _LW
|
||||
from neutron.extensions import portbindings
|
||||
|
||||
from networking_arista._i18n import _, _LI, _LW, _LE
|
||||
from networking_arista.common import db_lib
|
||||
from networking_arista.common import exceptions as arista_exc
|
||||
from networking_arista.ml2 import arista_sec_gp
|
||||
|
|
|
@ -18,8 +18,7 @@ import jsonrpclib
|
|||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron._i18n import _LI
|
||||
|
||||
from networking_arista._i18n import _, _LI
|
||||
from networking_arista.common import db_lib
|
||||
from networking_arista.common import exceptions as arista_exc
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
from oslo_log import log
|
||||
from six import moves
|
||||
|
||||
from neutron._i18n import _LI
|
||||
from neutron.db import api as db_api
|
||||
from neutron.plugins.ml2.drivers import type_vlan
|
||||
|
||||
from networking_arista._i18n import _LI
|
||||
from networking_arista.common import exceptions as arista_exc
|
||||
from networking_arista.ml2.arista_ml2 import EOS_UNREACHABLE_MSG
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ import threading
|
|||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
|
||||
from neutron.i18n import _LI
|
||||
from neutron.plugins.ml2.drivers import type_vlan
|
||||
|
||||
from networking_arista._i18n import _LI
|
||||
from networking_arista.common import config # noqa
|
||||
from networking_arista.ml2 import arista_ml2
|
||||
from networking_arista.ml2.drivers import driver_helpers
|
||||
|
|
|
@ -19,13 +19,12 @@ from neutron_lib import constants as n_const
|
|||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron._i18n import _LE
|
||||
from neutron._i18n import _LI
|
||||
from neutron.extensions import portbindings
|
||||
from neutron.plugins.common import constants as p_const
|
||||
from neutron.plugins.ml2.common import exceptions as ml2_exc
|
||||
from neutron.plugins.ml2 import driver_api
|
||||
|
||||
from networking_arista._i18n import _, _LI, _LE
|
||||
from networking_arista.common import config # noqa
|
||||
from networking_arista.common import db
|
||||
from networking_arista.common import db_lib
|
||||
|
|
|
@ -17,11 +17,12 @@ from oslo_log import helpers as log_helpers
|
|||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
from neutron._i18n import _LE
|
||||
from neutron.callbacks import events
|
||||
from neutron.callbacks import registry
|
||||
from neutron.callbacks import resources
|
||||
|
||||
from networking_arista._i18n import _LE
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -4,5 +4,6 @@
|
|||
|
||||
Babel>=1.3
|
||||
jsonrpclib
|
||||
neutron-lib>=0.3.0 # Apache-2.0
|
||||
oslo.log>=0.4.0 # Apache-2.0
|
||||
pbr<2.0,>=0.11
|
||||
|
|
|
@ -14,4 +14,3 @@ testrepository>=0.0.18
|
|||
testscenarios>=0.4
|
||||
testtools>=0.9.34
|
||||
testresources>=0.2.4
|
||||
neutron-lib>=0.1.0 # Apache-2.0
|
||||
|
|
Loading…
Reference in New Issue