LOG.error(errorMessage)
return falseRet
- LOG.info("Volume status is: %s" % volumeStatus)
+ LOG.info(_LI("Volume status is: %s"), volumeStatus)
if (host['capabilities']['storage_protocol'] != self.protocol and
(volumeStatus != 'available' and volumeStatus != 'retyping')):
errorMessage = (_(
# If there are no extra specs then the default case is assumed
if extraSpecs:
configGroup = self.configuration.config_group
- LOG.info("configGroup of current host: %s" % configGroup)
+ LOG.info(_LI("configGroup of current host: %s"), configGroup)
configurationFile = self._register_config_file_from_config_group(
configGroup)
volumename = volume['name']
vol_instance = self._find_lun(volume)
if vol_instance is None:
- msg = ("Volume %(name)s not found on the array. "
- "Cannot determine if there are volumes mapped."
- % {'name': volumename})
+ msg = (_("Volume %(name)s not found on the array. "
+ "Cannot determine if there are volumes mapped."),
+ {'name': volumename})
LOG.error(msg)
raise exception.VolumeBackendAPIException(data=msg)
targetWwns = []
mvInstanceName = self.get_masking_view_by_volume(volume)
targetWwns = self.masking.get_target_wwns(self.conn, mvInstanceName)
- LOG.info("Target wwns in masking view %(maskingView)s: %(targetWwns)s"
- % {'maskingView': mvInstanceName,
- 'targetWwns': str(targetWwns)})
+ LOG.info(_LI("Target wwns in masking view %(maskingView)s: "
+ "%(targetWwns)s"),
+ {'maskingView': mvInstanceName,
+ 'targetWwns': str(targetWwns)})
return targetWwns
def get_port_group_from_masking_view(self, maskingViewInstanceName):
import six
from cinder import context
+from cinder.i18n import _LI
from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.emc import emc_vmax_common
loc = volume['provider_location']
name = eval(loc)
storage_system = name['keybindings']['SystemName']
- LOG.info("Start FC detach process for volume: %(volume)s"
+ LOG.info(_LI("Start FC detach process for volume: %(volume)s")
% {'volume': volume['name']})
target_wwns, init_targ_map = self._build_initiator_target_map(
portGroupInstanceName = self.common.get_port_group_from_masking_view(
mvInstanceName)
- LOG.info("Found port group: %(portGroup)s "
- "in masking view %(maskingView)s"
- % {'portGroup': portGroupInstanceName,
- 'maskingView': mvInstanceName})
+ LOG.info(_LI("Found port group: %(portGroup)s "
+ "in masking view %(maskingView)s"),
+ {'portGroup': portGroupInstanceName,
+ 'maskingView': mvInstanceName})
self.common.terminate_connection(volume, connector)
- LOG.info("Looking for masking views still associated with"
- "Port Group %s" % portGroupInstanceName)
+ LOG.info(_LI("Looking for masking views still associated with"
+ "Port Group %s"), portGroupInstanceName)
mvInstances = self.common.get_masking_views_by_port_group(
portGroupInstanceName)
if len(mvInstances) > 0:
" %(fastPolicyName)s. ")
% {'volumeName': volumeName,
'fastPolicyName': fastPolicyName})
- LOG.warn("No storage group found. " + infoMessage)
+ LOG.warning(_LW("No storage group found. %s"), infoMessage)
assocDefaultStorageGroupName = (
self.fast
.add_volume_to_default_storage_group_for_fast_policy(
ResultClass='Symm_FCSCSIProtocolEndpoint')
numberOfPorts = len(targetPortInstanceNames)
if numberOfPorts <= 0:
- LOG.warn("No target ports found in "
- "masking view %(maskingView)s"
- % {'numPorts': len(targetPortInstanceNames),
- 'maskingView': mvInstanceName})
+ LOG.warning(_LW("No target ports found in "
+ "masking view %(maskingView)s"),
+ {'numPorts': len(targetPortInstanceNames),
+ 'maskingView': mvInstanceName})
for targetPortInstanceName in targetPortInstanceNames:
targetWwns.append(targetPortInstanceName['Name'])
return targetWwns
'mv': maskingViewInstanceName})
return portGroupInstanceNames[0]
else:
- LOG.warn("No port group found in masking view %(mv)s"
- % {'mv': maskingViewInstanceName})
+ LOG.warning(_LW("No port group found in masking view %(mv)s"),
+ {'mv': maskingViewInstanceName})