Browse Source

Fix logging calls

This patch fixes the following items.

- Missing a marker function _LI
- String interpolation
- A typo (ENsuring -> Ensuring)

* Guidelines for Use In OpenStack — oslo.i18n
http://docs.openstack.org/developer/oslo.i18n/guidelines.html

Change-Id: I4cc5781100fd2d2be3dd5c44c789396f3fdbd649
Closes-Bug: #1596829
tags/1.2.0
Takashi NATSUME 3 years ago
parent
commit
ff28181fdd
2 changed files with 4 additions and 3 deletions
  1. 3
    2
      os_vif/__init__.py
  2. 1
    1
      vif_plug_linux_bridge/linux_net.py

+ 3
- 2
os_vif/__init__.py View File

@@ -43,8 +43,9 @@ def initialize(reset=False):
43 43
         for plugin_name in _EXT_MANAGER.names():
44 44
             cls = _EXT_MANAGER[plugin_name].plugin
45 45
             obj = cls.load(plugin_name)
46
-            LOG.info("Loaded VIF plugin class '%s' with name '%s'",
47
-                     cls, plugin_name)
46
+            LOG.info(_LI("Loaded VIF plugin class '%(cls)s' "
47
+                         "with name '%(plugin_name)s'"),
48
+                     {'cls': cls, 'plugin_name': plugin_name})
48 49
             _EXT_MANAGER[plugin_name].obj = obj
49 50
 
50 51
 

+ 1
- 1
vif_plug_linux_bridge/linux_net.py View File

@@ -175,7 +175,7 @@ def _ensure_bridge_privileged(bridge, interface, net_attrs, gateway,
175 175
 def _ensure_bridge_filtering(bridge, gateway):
176 176
     # This method leaves privsep usage to iptables manager
177 177
     # Don't forward traffic unless we were told to be a gateway
178
-    LOG.debug("ENsuring filtering %s to %s" % (bridge, gateway))
178
+    LOG.debug("Ensuring filtering %s to %s", bridge, gateway)
179 179
     global _IPTABLES_MANAGER
180 180
     ipv4_filter = _IPTABLES_MANAGER.ipv4['filter']
181 181
     if gateway:

Loading…
Cancel
Save