summaryrefslogtreecommitdiff
path: root/neutron/notifiers
diff options
context:
space:
mode:
authorInessa Vasilevskaya <ivasilevskaya@mirantis.com>2017-04-04 19:14:12 +0300
committerAkihiro Motoki <amotoki@gmail.com>2017-08-14 02:01:48 +0000
commit7322bd6efb6e61acb2e967be22f84554d064ec7e (patch)
tree2fb47f306072168cd092773b64f156b48c8d68b1 /neutron/notifiers
parentc65e541b6ed9a7d2b1dc8825c705eaa10b7cc650 (diff)
downloadneutron-7322bd6efb6e61acb2e967be22f84554d064ec7e.tar.gz
Make code follow log translation guideline
Since Pike log messages should not be translated. This patch removes calls to i18n _LC, _LI, _LE, _LW from logging logic throughout the code. Translators definition from neutron._i18n is removed as well. This patch also removes log translation verification from ignore directive in tox.ini. Change-Id: If9aa76fcf121c0e61a7c08088006c5873faee56e
Diffstat (limited to 'neutron/notifiers')
-rw-r--r--neutron/notifiers/nova.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/neutron/notifiers/nova.py b/neutron/notifiers/nova.py
index 196bd316c9..43245f89f1 100644
--- a/neutron/notifiers/nova.py
+++ b/neutron/notifiers/nova.py
@@ -29,7 +29,6 @@ from oslo_log import log as logging
from oslo_utils import uuidutils
from sqlalchemy.orm import attributes as sql_attr
-from neutron._i18n import _LE, _LI, _LW
from neutron.notifiers import batch_notifier
@@ -162,8 +161,8 @@ class Notifier(object):
def _can_notify(self, port):
if not port.id:
- LOG.warning(_LW("Port ID not set! Nova will not be notified of "
- "port status change."))
+ LOG.warning("Port ID not set! Nova will not be notified of "
+ "port status change.")
return False
# If there is no device_id set there is nothing we can do here.
@@ -248,11 +247,11 @@ class Notifier(object):
LOG.debug("Nova returned NotFound for event: %s",
batched_events)
except Exception:
- LOG.exception(_LE("Failed to notify nova on events: %s"),
+ LOG.exception("Failed to notify nova on events: %s",
batched_events)
else:
if not isinstance(response, list):
- LOG.error(_LE("Error response returned from nova: %s"),
+ LOG.error("Error response returned from nova: %s",
response)
return
response_error = False
@@ -263,10 +262,10 @@ class Notifier(object):
response_error = True
continue
if code != 200:
- LOG.warning(_LW("Nova event: %s returned with failed "
- "status"), event)
+ LOG.warning("Nova event: %s returned with failed "
+ "status", event)
else:
- LOG.info(_LI("Nova event response: %s"), event)
+ LOG.info("Nova event response: %s", event)
if response_error:
- LOG.error(_LE("Error response returned from nova: %s"),
+ LOG.error("Error response returned from nova: %s",
response)