Merge "Fix string interpolation to delayed to be handled by the logging code"

This commit is contained in:
Jenkins 2016-07-12 13:23:12 +00:00 committed by Gerrit Code Review
commit 6c95f19bfa
3 changed files with 15 additions and 15 deletions

View File

@ -148,7 +148,7 @@ def get_connector_properties(root_helper, my_ip, multipath, enforce_multipath,
if (utils.platform_matches(props['platform'], connector.platform) and if (utils.platform_matches(props['platform'], connector.platform) and
utils.os_matches(props['os_type'], connector.os_type)): utils.os_matches(props['os_type'], connector.os_type)):
LOG.debug("Fetching connector for %s" % connector.__name__) LOG.debug("Fetching connector for %s", connector.__name__)
props = utils.merge_dict(props, props = utils.merge_dict(props,
connector.get_connector_properties( connector.get_connector_properties(
root_helper, root_helper,
@ -3063,7 +3063,7 @@ class DISCOConnector(BaseLinuxConnector):
def _mount_disco_volume(self, path, volume_id): def _mount_disco_volume(self, path, volume_id):
"""Send request to mount volume on physical host.""" """Send request to mount volume on physical host."""
LOG.debug("Enter in mount disco volume %(port)s " LOG.debug("Enter in mount disco volume %(port)s "
"and %(ip)s." % "and %(ip)s.",
{'port': self.server_port, {'port': self.server_port,
'ip': self.server_ip}) 'ip': self.server_ip})

View File

@ -2010,8 +2010,8 @@ class HuaweiStorHyperConnectorTestCase(ConnectorTestCase):
' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f', ' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f',
self.fake_sdscli_file + ' -c querydev' self.fake_sdscli_file + ' -c querydev'
' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f'] ' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f']
LOG.debug("self.cmds = %s." % self.cmds) LOG.debug("self.cmds = %s.", self.cmds)
LOG.debug("expected = %s." % expected_commands) LOG.debug("expected = %s.", expected_commands)
self.assertEqual(expected_commands, self.cmds) self.assertEqual(expected_commands, self.cmds)
@ -2030,8 +2030,8 @@ class HuaweiStorHyperConnectorTestCase(ConnectorTestCase):
self.fake_sdscli_file + ' -c detach' self.fake_sdscli_file + ' -c detach'
' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f'] ' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f']
LOG.debug("self.cmds = %s." % self.cmds) LOG.debug("self.cmds = %s.", self.cmds)
LOG.debug("expected = %s." % expected_commands) LOG.debug("expected = %s.", expected_commands)
self.assertEqual(expected_commands, self.cmds) self.assertEqual(expected_commands, self.cmds)
@ -2062,8 +2062,8 @@ class HuaweiStorHyperConnectorTestCase(ConnectorTestCase):
self.fake_sdscli_file + ' -c querydev' self.fake_sdscli_file + ' -c querydev'
' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f'] ' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f']
LOG.debug("self.cmds = %s." % self.cmds) LOG.debug("self.cmds = %s.", self.cmds)
LOG.debug("expected = %s." % expected_commands) LOG.debug("expected = %s.", expected_commands)
self.assertEqual(expected_commands, self.cmds) self.assertEqual(expected_commands, self.cmds)
@ -2082,8 +2082,8 @@ class HuaweiStorHyperConnectorTestCase(ConnectorTestCase):
self.connection_properties) self.connection_properties)
expected_commands = [self.fake_sdscli_file + ' -c attach' expected_commands = [self.fake_sdscli_file + ' -c attach'
' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f'] ' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f']
LOG.debug("self.cmds = %s." % self.cmds) LOG.debug("self.cmds = %s.", self.cmds)
LOG.debug("expected = %s." % expected_commands) LOG.debug("expected = %s.", expected_commands)
self.assertEqual(expected_commands, self.cmds) self.assertEqual(expected_commands, self.cmds)
def test_disconnect_volume_fail(self): def test_disconnect_volume_fail(self):
@ -2102,8 +2102,8 @@ class HuaweiStorHyperConnectorTestCase(ConnectorTestCase):
self.fake_sdscli_file + ' -c detach' self.fake_sdscli_file + ' -c detach'
' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f'] ' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f']
LOG.debug("self.cmds = %s." % self.cmds) LOG.debug("self.cmds = %s.", self.cmds)
LOG.debug("expected = %s." % expected_commands) LOG.debug("expected = %s.", expected_commands)
self.assertEqual(expected_commands, self.cmds) self.assertEqual(expected_commands, self.cmds)
@ -2126,8 +2126,8 @@ class HuaweiStorHyperConnectorTestCase(ConnectorTestCase):
self.fake_sdscli_file + ' -c querydev' self.fake_sdscli_file + ' -c querydev'
' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f'] ' -v volume-b2911673-863c-4380-a5f2-e1729eecfe3f']
LOG.debug("self.cmds = %s." % self.cmds) LOG.debug("self.cmds = %s.", self.cmds)
LOG.debug("expected = %s." % expected_commands) LOG.debug("expected = %s.", expected_commands)
def test_extend_volume(self): def test_extend_volume(self):
self.assertRaises(NotImplementedError, self.assertRaises(NotImplementedError,

View File

@ -477,7 +477,7 @@ loop0 0"""
self.linuxscsi._execute = fake_execute self.linuxscsi._execute = fake_execute
info = self.linuxscsi.find_multipath_device('/dev/sdd') info = self.linuxscsi.find_multipath_device('/dev/sdd')
LOG.error("Device info: %s" % info) LOG.error("Device info: %s", info)
self.assertEqual('36005076303ffc48e0000000000000101', info['id']) self.assertEqual('36005076303ffc48e0000000000000101', info['id'])
self.assertEqual('36005076303ffc48e0000000000000101', info['name']) self.assertEqual('36005076303ffc48e0000000000000101', info['name'])