From e55195e88e9bb12e96502b8a9596e3dd7a75a5f5 Mon Sep 17 00:00:00 2001 From: zhufl Date: Wed, 23 Jan 2019 11:41:40 +0800 Subject: [PATCH] Add missing ws seperator between words This is to add missing ws seperator between words, usually in log messages. Change-Id: Ia4c9c07bc573f1cf7f93c40ec8582dc3599f069e --- cinder/image/image_utils.py | 2 +- cinder/scheduler/host_manager.py | 2 +- cinder/tests/unit/test_image_utils.py | 2 +- cinder/volume/drivers/drbdmanagedrv.py | 2 +- cinder/volume/drivers/hedvig/hedvig_cinder.py | 6 +++--- cinder/volume/drivers/rbd.py | 4 ++-- cinder/volume/drivers/zfssa/zfssarest.py | 20 +++++++++---------- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/cinder/image/image_utils.py b/cinder/image/image_utils.py index 72dd25ea6e9..27b15ec98ec 100644 --- a/cinder/image/image_utils.py +++ b/cinder/image/image_utils.py @@ -247,7 +247,7 @@ def _convert_image(prefix, source, dest, out_format, while not os.path.ismount(conversion_dir): conversion_dir = os.path.dirname(conversion_dir) - message = _("Insufficient free space on %(location)s for image" + message = _("Insufficient free space on %(location)s for image " "conversion.") % {'location': conversion_dir} LOG.error(message) diff --git a/cinder/scheduler/host_manager.py b/cinder/scheduler/host_manager.py index ba005bb5844..ee64b850bd2 100644 --- a/cinder/scheduler/host_manager.py +++ b/cinder/scheduler/host_manager.py @@ -547,7 +547,7 @@ class HostManager(object): cluster_msg = (('Cluster: %s - Host: ' % cluster_name) if cluster_name else '') - LOG.debug("Received %(service_name)s service update from %(cluster)s" + LOG.debug("Received %(service_name)s service update from %(cluster)s " "%(host)s: %(cap)s%(cluster)s", {'service_name': service_name, 'host': host, 'cap': capabilities, diff --git a/cinder/tests/unit/test_image_utils.py b/cinder/tests/unit/test_image_utils.py index b336694cb29..1f5df668cbf 100644 --- a/cinder/tests/unit/test_image_utils.py +++ b/cinder/tests/unit/test_image_utils.py @@ -313,7 +313,7 @@ class TestConvertImage(test.TestCase): image_utils.convert_image, source, dest, out_format) mock_log.assert_called_with('Insufficient free space on fakedir for' - ' imageconversion.') + ' image conversion.') class TestResizeImage(test.TestCase): diff --git a/cinder/volume/drivers/drbdmanagedrv.py b/cinder/volume/drivers/drbdmanagedrv.py index 2949a298938..0a593661f3d 100644 --- a/cinder/volume/drivers/drbdmanagedrv.py +++ b/cinder/volume/drivers/drbdmanagedrv.py @@ -230,7 +230,7 @@ class DrbdManageBaseDriver(driver.VolumeDriver): """Any initialization the volume driver does while starting.""" super(DrbdManageBaseDriver, self).do_setup(context) - msg = _("The DRBD Manage driver is moving to maintenance mode" + msg = _("The DRBD Manage driver is moving to maintenance mode " "in the Stein release and will be removed in T release.") versionutils.report_deprecated_feature(LOG, msg) diff --git a/cinder/volume/drivers/hedvig/hedvig_cinder.py b/cinder/volume/drivers/hedvig/hedvig_cinder.py index 5684eb5c0d3..a3a6d0c2e59 100644 --- a/cinder/volume/drivers/hedvig/hedvig_cinder.py +++ b/cinder/volume/drivers/hedvig/hedvig_cinder.py @@ -256,7 +256,7 @@ class HedvigISCSIDriver(driver.ISCSIDriver, san.SanDriver): snapshotName, project, snapshotId) self.hedvig_create_snapshot(volName, snapshotId) except exception.VolumeDriverException: - msg = (_('Failed to create snapshot. snapshotName: %s' + msg = (_('Failed to create snapshot. snapshotName: %s ' 'Rest API failed') % snapshotName) LOG.exception(msg) raise exception.VolumeDriverException(msg) @@ -277,7 +277,7 @@ class HedvigISCSIDriver(driver.ISCSIDriver, san.SanDriver): "project: %s", volName, snapshotName, project) self.hrs.delete_snapshot(snapshotName, volName, snapshotId) except exception.VolumeDriverException: - msg = _('Failed to delete snapshot: %s' + msg = _('Failed to delete snapshot: %s, ' 'Rest API failed') % snapshotName LOG.exception(msg) raise exception.VolumeDriverException(msg) @@ -430,7 +430,7 @@ class HedvigISCSIDriver(driver.ISCSIDriver, san.SanDriver): LOG.debug("Found hedvig controller: %s, for host: %s", tgt, host) return tgt except exception.VolumeDriverException: - msg = _('Failed to get hedvig controller for compute %s' + msg = _('Failed to get hedvig controller for compute %s ' 'Rest API failed') % host LOG.exception(msg) raise exception.VolumeDriverException(msg) diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py index b57ff211501..ba10a99fde5 100644 --- a/cinder/volume/drivers/rbd.py +++ b/cinder/volume/drivers/rbd.py @@ -123,7 +123,7 @@ RBD_OPTS = [ 'for permanent removal after being tagged for deferred ' 'deletion.'), cfg.IntOpt('deferred_deletion_purge_interval', default=60, - help='Number of seconds between runs of the periodic task' + help='Number of seconds between runs of the periodic task ' 'to purge volumes tagged for deletion.'), ] @@ -788,7 +788,7 @@ class RBDDriver(driver.CloneableImageVD, driver.MigrateVD, raise exception.VolumeDriverException(message=message) if 'cipher' not in encryption or 'key_size' not in encryption: - msg = _('encryption spec must contain "cipher" and' + msg = _('encryption spec must contain "cipher" and ' '"key_size"') raise exception.VolumeDriverException(message=msg) diff --git a/cinder/volume/drivers/zfssa/zfssarest.py b/cinder/volume/drivers/zfssa/zfssarest.py index 7e655782c7e..102dce78718 100644 --- a/cinder/volume/drivers/zfssa/zfssarest.py +++ b/cinder/volume/drivers/zfssa/zfssarest.py @@ -510,7 +510,7 @@ class ZFSSAApi(object): ret = self.rclient.post(svc, arg) if ret.status != restclient.Status.CREATED: exception_msg = (_('Error Adding Initiator: ' - '%(initiator)s on group' + '%(initiator)s on group ' 'InitiatorGroup: %(initiatorgroup)s ' 'Return code: %(ret.status)d ' 'Message: %(ret.data)s .') @@ -545,7 +545,7 @@ class ZFSSAApi(object): ret = self.rclient.put(svc, arg) if ret.status != restclient.Status.ACCEPTED: exception_msg = (_('Error Adding Initiator: ' - '%(initiator)s on group' + '%(initiator)s on group ' 'InitiatorGroup: %(initiatorgroup)s ' 'Return code: %(ret.status)d ' 'Message: %(ret.data)s .') @@ -584,7 +584,7 @@ class ZFSSAApi(object): ret = self.rclient.post(svc, arg) if ret.status != restclient.Status.CREATED: exception_msg = (_('Error Creating Target: ' - '%(alias)s' + '%(alias)s ' 'Return code: %(ret.status)d ' 'Message: %(ret.data)s .') % {'alias': alias, @@ -602,7 +602,7 @@ class ZFSSAApi(object): ret = self.rclient.get(svc) if ret.status != restclient.Status.OK: exception_msg = (_('Error Getting Target: ' - '%(alias)s' + '%(alias)s ' 'Return code: %(ret.status)d ' 'Message: %(ret.data)s .') % {'alias': alias, @@ -628,8 +628,8 @@ class ZFSSAApi(object): ret = self.rclient.post(svccrt, arg) if ret.status != restclient.Status.CREATED: exception_msg = (_('Error Creating TargetGroup: ' - '%(targetgroup)s with' - 'IQN: %(iqn)s' + '%(targetgroup)s with ' + 'IQN: %(iqn)s ' 'Return code: %(ret.status)d ' 'Message: %(ret.data)s .') % {'targetgroup': targetgroup, @@ -648,8 +648,8 @@ class ZFSSAApi(object): ret = self.rclient.put(svc, arg) if ret.status != restclient.Status.ACCEPTED: exception_msg = (_('Error Adding to TargetGroup: ' - '%(targetgroup)s with' - 'IQN: %(iqn)s' + '%(targetgroup)s with ' + 'IQN: %(iqn)s ' 'Return code: %(ret.status)d ' 'Message: %(ret.data)s.') % {'targetgroup': targetgroup, @@ -952,7 +952,7 @@ class ZFSSAApi(object): ret = self.rclient.post(svc, arg) if ret.status != restclient.Status.CREATED: exception_msg = (_('Error Creating ' - 'Snapshot: %(snapshot)s on' + 'Snapshot: %(snapshot)s on ' 'Volume: %(lun)s to ' 'Pool: %(pool)s ' 'Project: %(project)s ' @@ -1153,7 +1153,7 @@ class ZFSSANfsApi(ZFSSAApi): ret = self.rclient.post(svc, arg) if ret.status != restclient.Status.CREATED: exception_msg = (_('Error Creating ' - 'Snapshot: %(snapshot)s on' + 'Snapshot: %(snapshot)s on ' 'share: %(share)s to ' 'Pool: %(pool)s ' 'Project: %(project)s '