From cb33593e3d93903990b568b41e545f75a4dd5e83 Mon Sep 17 00:00:00 2001 From: Shane Wang Date: Fri, 7 Feb 2014 14:45:43 +0800 Subject: [PATCH] Fix misspellings in cinder Fix misspellings detected by: * pip install misspellings * git ls-files | grep -v locale | misspellings -f - Change-Id: I4780a9cdd4a2aff5a3dbc55c87e93b0972d907db Closes-Bug: #1257295 --- cinder/scheduler/flows/create_volume.py | 2 +- cinder/scheduler/weights/capacity.py | 2 +- cinder/tests/test_exception.py | 4 ++-- cinder/volume/drivers/netapp/iscsi.py | 2 +- cinder/volume/manager.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cinder/scheduler/flows/create_volume.py b/cinder/scheduler/flows/create_volume.py index 805622af2..c8f00beda 100644 --- a/cinder/scheduler/flows/create_volume.py +++ b/cinder/scheduler/flows/create_volume.py @@ -89,7 +89,7 @@ def get_flow(context, db, driver, request_spec=None, 1. Inject keys & values for dependent tasks. 2. Extracts a scheduler specification from the provided inputs. 3. Attaches 2 activated only on *failure* tasks (one to update the db - status and one to notify on the MQ of the failure that occured). + status and one to notify on the MQ of the failure that occurred). 4. Uses provided driver to to then select and continue processing of volume request. """ diff --git a/cinder/scheduler/weights/capacity.py b/cinder/scheduler/weights/capacity.py index d4f20b5e3..099c58d21 100644 --- a/cinder/scheduler/weights/capacity.py +++ b/cinder/scheduler/weights/capacity.py @@ -28,7 +28,7 @@ number and the weighing has the opposite effect of the default. The default behavior is to place new volume to the host allocated the least space. This weigher is intended to simulate the behavior of SimpleScheduler. If you prefer to place volumes to host allocated the most space, you can -set the 'allocated_capacity_weight_multiplier' option to a postive number +set the 'allocated_capacity_weight_multiplier' option to a positive number and the weighing has the opposite effect of the default. """ diff --git a/cinder/tests/test_exception.py b/cinder/tests/test_exception.py index f4c5f4800..560e3d83d 100644 --- a/cinder/tests/test_exception.py +++ b/cinder/tests/test_exception.py @@ -71,10 +71,10 @@ class CinderExceptionTestCase(test.TestCase): self.flags(fatal_exception_format_errors=False) class FakeCinderException(exception.CinderException): - message = "default message: %(mispelled_code)s" + message = "default message: %(misspelled_code)s" exc = FakeCinderException(code=500) - self.assertEqual(unicode(exc), 'default message: %(mispelled_code)s') + self.assertEqual(unicode(exc), 'default message: %(misspelled_code)s') def test_default_error_code(self): class FakeCinderException(exception.CinderException): diff --git a/cinder/volume/drivers/netapp/iscsi.py b/cinder/volume/drivers/netapp/iscsi.py index 50581cf89..a8c18996b 100644 --- a/cinder/volume/drivers/netapp/iscsi.py +++ b/cinder/volume/drivers/netapp/iscsi.py @@ -229,7 +229,7 @@ class NetAppDirectISCSIDriver(driver.ISCSIDriver): LOG.debug(msg % msg_fmt) iqn = self._get_iscsi_service_details() target_details_list = self._get_target_details() - msg = _("Succesfully fetched target details for LUN %(name)s and " + msg = _("Successfully fetched target details for LUN %(name)s and " "initiator %(initiator_name)s") msg_fmt = {'name': name, 'initiator_name': initiator_name} LOG.debug(msg % msg_fmt) diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 0b4e7a9d3..c88c19553 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -1218,7 +1218,7 @@ class VolumeManager(manager.SchedulerDependentManager): retyped = self.driver.retype(context, volume_ref, new_type, diff, host) if retyped: - LOG.info(_("Volume %s: retyped succesfully"), volume_id) + LOG.info(_("Volume %s: retyped successfully"), volume_id) except Exception as ex: retyped = False LOG.error(_("Volume %s: driver error when trying to retype, " -- 2.45.2