summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Still <mikal@stillhq.com>2013-05-23 16:18:29 +1000
committerMichael Still <mikal@stillhq.com>2013-05-23 16:19:01 +1000
commit5aeb4a990ac723d15f8f6a28b4dc82230d86cf9c (patch)
treede2af2bc49eccfad429a9db1b339beb1b3f34b4c
parentaf7048590dac77806dd3e7c97a736fda52c2389b (diff)
Remove locals() usage from nova.virt.libvirt.volume.
Change-Id: Idda3c0c447bd1f6394805cd6230a32dc22bb6268
-rw-r--r--nova/virt/libvirt/volume.py33
1 files changed, 20 insertions, 13 deletions
diff --git a/nova/virt/libvirt/volume.py b/nova/virt/libvirt/volume.py
index ef8818743..317d398d6 100644
--- a/nova/virt/libvirt/volume.py
+++ b/nova/virt/libvirt/volume.py
@@ -239,8 +239,9 @@ class LibvirtISCSIVolumeDriver(LibvirtBaseVolumeDriver):
% (host_device))
LOG.warn(_("ISCSI volume not yet found at: %(disk_dev)s. "
- "Will rescan & retry. Try number: %(tries)s") %
- locals())
+ "Will rescan & retry. Try number: %(tries)s"),
+ {'disk_dev': disk_dev,
+ 'tries': tries})
# The rescan isn't documented as being necessary(?), but it helps
self._run_iscsiadm(iscsi_properties, ("--rescan",))
@@ -251,8 +252,9 @@ class LibvirtISCSIVolumeDriver(LibvirtBaseVolumeDriver):
if tries != 0:
LOG.debug(_("Found iSCSI node %(disk_dev)s "
- "(after %(tries)s rescans)") %
- locals())
+ "(after %(tries)s rescans)"),
+ {'disk_dev': disk_dev,
+ 'tries': tries})
if libvirt_iscsi_use_multipath:
#we use the multipath device instead of the single path device
@@ -563,8 +565,9 @@ class LibvirtAOEVolumeDriver(LibvirtBaseVolumeDriver):
raise exception.NovaException(_("AoE device not found at %s") %
(aoedevpath))
LOG.warn(_("AoE volume not yet found at: %(aoedevpath)s. "
- "Try number: %(tries)s") %
- locals())
+ "Try number: %(tries)s"),
+ {'aoedevpath': aoedevpath,
+ 'tries': tries})
self._aoe_discover()
self.tries = self.tries + 1
@@ -577,8 +580,9 @@ class LibvirtAOEVolumeDriver(LibvirtBaseVolumeDriver):
tries = self.tries
if tries != 0:
LOG.debug(_("Found AoE device %(aoedevpath)s "
- "(after %(tries)s rediscover)") %
- locals())
+ "(after %(tries)s rediscover)"),
+ {'aoedevpath': aoedevpath,
+ 'tries': tries})
conf = super(LibvirtAOEVolumeDriver,
self).connect_volume(connection_info, mount_device)
@@ -713,8 +717,8 @@ class LibvirtFibreChannelVolumeDriver(LibvirtBaseVolumeDriver):
def _wait_for_device_discovery(host_devices, mount_device):
tries = self.tries
for device in host_devices:
- LOG.debug(_("Looking for Fibre Channel dev %(device)s")
- % locals())
+ LOG.debug(_("Looking for Fibre Channel dev %(device)s"),
+ {'device': device})
if os.path.exists(device):
self.host_device = device
# get the /dev/sdX device. This is used
@@ -727,8 +731,9 @@ class LibvirtFibreChannelVolumeDriver(LibvirtBaseVolumeDriver):
raise exception.NovaException(msg)
LOG.warn(_("Fibre volume not yet found at: %(mount_device)s. "
- "Will rescan & retry. Try number: %(tries)s") %
- locals())
+ "Will rescan & retry. Try number: %(tries)s"),
+ {'mount_device': mount_device,
+ 'tries': tries})
linuxscsi.rescan_hosts(hbas)
self.tries = self.tries + 1
@@ -743,7 +748,9 @@ class LibvirtFibreChannelVolumeDriver(LibvirtBaseVolumeDriver):
tries = self.tries
if self.host_device is not None and self.device_name is not None:
LOG.debug(_("Found Fibre Channel volume %(mount_device)s "
- "(after %(tries)s rescans)") % locals())
+ "(after %(tries)s rescans)"),
+ {'mount_device': mount_device,
+ 'tries': tries})
# see if the new drive is part of a multipath
# device. If so, we'll use the multipath device.