Fix mis-formatted log messages

Fix errors in log messages. These were detected by a patch that catches
these types of errors. Submitting these fixes first as the patch to
detect the errors will likely take more time to get merged.

Conflicts:
      ironic/dhcp/neutron.py
      ironic/drivers/modules/irmc/boot.py
      ironic/drivers/modules/oneview/deploy_utils.py

Closes-Bug: #1722597
Change-Id: Ibe451f9cd97971cb83366fdc6f7f5c31d2af4793
(cherry picked from commit df5da4ce7a)
This commit is contained in:
John L. Villalovos 2017-10-05 22:57:26 -07:00
parent dfa2fb6dcd
commit ddf0d607c0
2 changed files with 2 additions and 1 deletions

View File

@ -204,7 +204,7 @@ class NeutronDHCPApi(base.BaseDHCP):
if isinstance(p_obj, objects.Port):
obj_name = 'port'
LOG.warning(_LW("No VIFs found for node %(node)s when attempting "
"to get IP address for %(obj_name)s: %(obj_id)."),
"to get IP address for %(obj_name)s: %(obj_id)s."),
{'node': task.node.uuid, 'obj_name': obj_name,
'obj_id': p_obj.uuid})
raise exception.FailedToGetIPAddressOnPort(port_id=p_obj.uuid)

View File

@ -729,6 +729,7 @@ class TaskManagerStateModelTestCases(tests_base.TestCase):
t.shared = True
t._purpose = 'purpose'
t._debug_timer = mock.Mock()
t._debug_timer.elapsed.return_value = 3.14
t.release_resources(t)
self.assertIsNone(t.node)