summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-04-07 06:37:51 +0000
committerGerrit Code Review <review@openstack.org>2017-04-07 06:37:51 +0000
commit06d3dfd797d964e142e89c63911d2cb9754944ed (patch)
tree979884ec1623d21892deae7c32accc4da974b45b
parentef93a52c2bef642e21644b232890706ef090503d (diff)
parent4bf3df40eeb0551bcd80de3af98c3f64398a0c03 (diff)
downloadpython-neutronclient-6.2.0.tar.gz
Merge "Remove log translations"6.2.0
-rw-r--r--neutronclient/_i18n.py12
-rw-r--r--neutronclient/i18n.py4
-rw-r--r--neutronclient/osc/v2/networking_bgpvpn/bgpvpn.py8
-rw-r--r--neutronclient/osc/v2/networking_bgpvpn/resource_association.py8
4 files changed, 7 insertions, 25 deletions
diff --git a/neutronclient/_i18n.py b/neutronclient/_i18n.py
index f5aa76b..50ac3c5 100644
--- a/neutronclient/_i18n.py
+++ b/neutronclient/_i18n.py
@@ -17,7 +17,7 @@ DOMAIN = 'neutronclient'
_translators = oslo_i18n.TranslatorFactory(domain=DOMAIN)
-# The primary translation function using the well-known name "_"
+# The translation function using the well-known name "_"
_ = _translators.primary
# The contextual translation function using the name "_C"
@@ -26,16 +26,6 @@ _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)
diff --git a/neutronclient/i18n.py b/neutronclient/i18n.py
index 776628f..8e9722c 100644
--- a/neutronclient/i18n.py
+++ b/neutronclient/i18n.py
@@ -21,7 +21,3 @@ message = ("moved to neutronclient._i18n; please migrate to local "
"http://docs.openstack.org/developer/oslo.i18n/usage.html")
_ = moves.moved_function(_i18n._, '_', __name__, message=message)
-_LC = moves.moved_function(_i18n._LC, '_LC', __name__, message=message)
-_LE = moves.moved_function(_i18n._LE, '_LE', __name__, message=message)
-_LW = moves.moved_function(_i18n._LW, '_LW', __name__, message=message)
-_LI = moves.moved_function(_i18n._LI, '_LI', __name__, message=message)
diff --git a/neutronclient/osc/v2/networking_bgpvpn/bgpvpn.py b/neutronclient/osc/v2/networking_bgpvpn/bgpvpn.py
index d0ba3d1..af7414e 100644
--- a/neutronclient/osc/v2/networking_bgpvpn/bgpvpn.py
+++ b/neutronclient/osc/v2/networking_bgpvpn/bgpvpn.py
@@ -22,8 +22,6 @@ from osc_lib import exceptions
from osc_lib import utils as osc_utils
from neutronclient._i18n import _
-from neutronclient._i18n import _LE
-from neutronclient._i18n import _LW
from neutronclient.osc import utils as nc_osc_utils
from neutronclient.osc.v2.networking_bgpvpn import constants
@@ -311,11 +309,11 @@ class DeleteBgpvpn(command.Command):
try:
id = client.find_resource(constants.BGPVPN, id_or_name)['id']
client.delete_bgpvpn(id)
- LOG.warning(_LW("BGP VPN %(id)s deleted"), {'id': id})
+ LOG.warning("BGP VPN %(id)s deleted", {'id': id})
except Exception as e:
fails += 1
- LOG.error(_LE("Failed to delete BGP VPN with name or ID "
- "'%(id_or_name)s': %(e)s"),
+ LOG.error("Failed to delete BGP VPN with name or ID "
+ "'%(id_or_name)s': %(e)s",
{'id_or_name': id_or_name, 'e': e})
if fails > 0:
msg = (_("Failed to delete %(fails)s of %(total)s BGP VPN.") %
diff --git a/neutronclient/osc/v2/networking_bgpvpn/resource_association.py b/neutronclient/osc/v2/networking_bgpvpn/resource_association.py
index 98f54cd..485803c 100644
--- a/neutronclient/osc/v2/networking_bgpvpn/resource_association.py
+++ b/neutronclient/osc/v2/networking_bgpvpn/resource_association.py
@@ -21,8 +21,6 @@ from osc_lib import exceptions
from osc_lib import utils as osc_utils
from neutronclient._i18n import _
-from neutronclient._i18n import _LE
-from neutronclient._i18n import _LW
from neutronclient.osc import utils as nc_osc_utils
from neutronclient.osc.v2.networking_bgpvpn import constants
@@ -105,13 +103,13 @@ class DeleteBgpvpnResAssoc(command.Command):
try:
delete_method(bgpvpn['id'], id)
LOG.warning(
- _LW("%(assoc_res_name)s association %(id)s deleted"),
+ "%(assoc_res_name)s association %(id)s deleted",
{'assoc_res_name': self._assoc_res_name.capitalize(),
'id': id})
except Exception as e:
fails += 1
- LOG.error(_LE("Failed to delete %(assoc_res_name)s "
- "association with ID '%(id)s': %(e)s"),
+ LOG.error("Failed to delete %(assoc_res_name)s "
+ "association with ID '%(id)s': %(e)s",
{'assoc_res_name': self._assoc_res_name,
'id': id,
'e': e})