From: Abhishek Lekshmanan Date: Wed, 2 Jul 2014 06:10:54 +0000 (+0530) Subject: Fixed some typos in the cinder codebase X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=95735b6f9e572f6eb80be29a124bbd1475784a95;p=openstack-build%2Fcinder-build.git Fixed some typos in the cinder codebase Change-Id: Ifb8778d20aa1534a7abca3fd6705493327d2893e --- diff --git a/cinder/backup/drivers/ceph.py b/cinder/backup/drivers/ceph.py index 6546dfe43..5fa735b5c 100644 --- a/cinder/backup/drivers/ceph.py +++ b/cinder/backup/drivers/ceph.py @@ -590,7 +590,7 @@ class CephBackupDriver(BackupDriver): def _backup_rbd(self, backup_id, volume_id, volume_file, volume_name, length): - """Create a incremental backup from an RBD image.""" + """Create an incremental backup from an RBD image.""" rbd_user = volume_file.rbd_user rbd_pool = volume_file.rbd_pool rbd_conf = volume_file.rbd_conf diff --git a/cinder/backup/drivers/tsm.py b/cinder/backup/drivers/tsm.py index 60b73060c..cc61dea5a 100644 --- a/cinder/backup/drivers/tsm.py +++ b/cinder/backup/drivers/tsm.py @@ -308,7 +308,7 @@ class TSMBackupDriver(BackupDriver): """Perform the actual restore operation. :param backup_path: the path the backup was created from, this - identifes the backup to tsm + identifies the backup to tsm :param restore_path: volume path to restore into :param vol_id: volume id :param backup_mode: mode used to create the backup ('image' or 'file') diff --git a/cinder/brick/iscsi/iscsi.py b/cinder/brick/iscsi/iscsi.py index 4ae78fee9..7f2a1e925 100644 --- a/cinder/brick/iscsi/iscsi.py +++ b/cinder/brick/iscsi/iscsi.py @@ -49,11 +49,11 @@ class TargetAdmin(executor.Executor): def create_iscsi_target(self, name, tid, lun, path, chap_auth=None, **kwargs): - """Create a iSCSI target and logical unit.""" + """Create an iSCSI target and logical unit.""" raise NotImplementedError() def remove_iscsi_target(self, tid, lun, vol_id, vol_name, **kwargs): - """Remove a iSCSI target and logical unit.""" + """Remove an iSCSI target and logical unit.""" raise NotImplementedError() def _new_target(self, name, tid, **kwargs): @@ -284,7 +284,7 @@ class TgtAdm(TargetAdmin): # For now work-around by checking if the target was deleted, # if it wasn't, try again without the force. - # This will NOT do any good for the case of mutliple sessions + # This will NOT do any good for the case of multiple sessions # which the force was aded for but it will however address # the cases pointed out in bug: # https://bugs.launchpad.net/cinder/+bug/1304122 diff --git a/cinder/db/sqlalchemy/api.py b/cinder/db/sqlalchemy/api.py index 643419a93..bb39a861e 100644 --- a/cinder/db/sqlalchemy/api.py +++ b/cinder/db/sqlalchemy/api.py @@ -2061,7 +2061,7 @@ def qos_specs_create(context, values): # Insert a root entry for QoS specs specs_root = models.QualityOfServiceSpecs() root = dict(id=specs_id) - # 'QoS_Specs_Name' is a internal reserved key to store + # 'QoS_Specs_Name' is an internal reserved key to store # the name of QoS specs root['key'] = 'QoS_Specs_Name' root['value'] = values['name'] @@ -2282,7 +2282,7 @@ def _qos_specs_get_item(context, qos_specs_id, key, session=None): @require_admin_context def qos_specs_update(context, qos_specs_id, specs): - """Make updates to a existing qos specs. + """Make updates to an existing qos specs. Perform add, update or delete key/values to a qos specs. """ diff --git a/cinder/db/sqlalchemy/models.py b/cinder/db/sqlalchemy/models.py index c4342427d..19e70edc6 100644 --- a/cinder/db/sqlalchemy/models.py +++ b/cinder/db/sqlalchemy/models.py @@ -137,7 +137,7 @@ class VolumeMetadata(BASE, CinderBase): class VolumeAdminMetadata(BASE, CinderBase): - """Represents a administrator metadata key/value pair for a volume.""" + """Represents an administrator metadata key/value pair for a volume.""" __tablename__ = 'volume_admin_metadata' id = Column(Integer, primary_key=True) key = Column(String(255)) diff --git a/cinder/image/image_utils.py b/cinder/image/image_utils.py index 941181920..92879e421 100644 --- a/cinder/image/image_utils.py +++ b/cinder/image/image_utils.py @@ -51,7 +51,7 @@ CONF.register_opts(image_helper_opt) def qemu_img_info(path): - """Return a object containing the parsed output from qemu-img info.""" + """Return an object containing the parsed output from qemu-img info.""" cmd = ('env', 'LC_ALL=C', 'qemu-img', 'info', path) if os.name == 'nt': cmd = cmd[2:] diff --git a/cinder/scheduler/flows/create_volume.py b/cinder/scheduler/flows/create_volume.py index e6da1c5de..e4260b572 100644 --- a/cinder/scheduler/flows/create_volume.py +++ b/cinder/scheduler/flows/create_volume.py @@ -103,7 +103,7 @@ class ScheduleCreateVolumeTask(flow_utils.CinderTask): {'cause': cause, 'name': self.name}) def _notify_failure(self, context, request_spec, cause): - """When scheduling fails send out a event that it failed.""" + """When scheduling fails send out an event that it failed.""" payload = { 'request_spec': request_spec, 'volume_properties': request_spec.get('volume_properties', {}), @@ -158,7 +158,7 @@ def get_flow(context, db_api, driver_api, request_spec=None, 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 occurred). - 4. Uses provided driver to to then select and continue processing of + 4. Uses provided driver to then select and continue processing of volume request. """ create_what = { diff --git a/cinder/test.py b/cinder/test.py index a5968ad1f..17819af3e 100644 --- a/cinder/test.py +++ b/cinder/test.py @@ -268,7 +268,7 @@ class TestCase(testtools.TestCase): error = abs(float(d1value) - float(d2value)) within_tolerance = error <= tolerance except (ValueError, TypeError): - # If both values aren't convertable to float, just ignore + # If both values aren't convertible to float, just ignore # ValueError if arg is a str, TypeError if it's something else # (like None) within_tolerance = False diff --git a/cinder/tests/api/v2/test_volumes.py b/cinder/tests/api/v2/test_volumes.py index 6d544d46e..3e42e2390 100644 --- a/cinder/tests/api/v2/test_volumes.py +++ b/cinder/tests/api/v2/test_volumes.py @@ -925,7 +925,7 @@ class VolumeApiTest(test.TestCase): volumes_links = res_dict['volumes_links'] _verify_links(volumes_links, key) - # Number of volumes less then max, do not include + # Number of volumes less than max, do not include def stub_volume_get_all2(context, marker, limit, sort_key, sort_dir, filters=None, @@ -943,7 +943,7 @@ class VolumeApiTest(test.TestCase): self.assertEqual(len(res_dict['volumes']), 100) self.assertFalse('volumes_links' in res_dict) - # Number of volumes more then the max, include next link + # Number of volumes more than the max, include next link def stub_volume_get_all3(context, marker, limit, sort_key, sort_dir, filters=None, @@ -961,7 +961,7 @@ class VolumeApiTest(test.TestCase): self.assertEqual(len(res_dict['volumes']), CONF.osapi_max_limit) volumes_links = res_dict['volumes_links'] _verify_links(volumes_links, key) - # Pass a limit that is greater then the max and the total number of + # Pass a limit that is greater than the max and the total number of # volumes, ensure only the maximum is returned and that the next # link is present for key, fn in zip(api_keys, fns): diff --git a/cinder/tests/test_backup_ceph.py b/cinder/tests/test_backup_ceph.py index ed328ef13..a28ed2a54 100644 --- a/cinder/tests/test_backup_ceph.py +++ b/cinder/tests/test_backup_ceph.py @@ -63,7 +63,7 @@ def common_mocks(f): """Decorator to set mocks common to all tests. The point of doing these mocks here is so that we don't accidentally set - mocks that can't/dont't get unset. + mocks that can't/don't get unset. """ def _common_inner_inner1(inst, *args, **kwargs): # NOTE(dosaboy): mock Popen to, by default, raise Exception in order to @@ -1037,7 +1037,7 @@ def common_meta_backup_mocks(f): """Decorator to set mocks common to all metadata backup tests. The point of doing these mocks here is so that we don't accidentally set - mocks that can't/dont't get unset. + mocks that can't/don't get unset. """ def _common_inner_inner1(inst, *args, **kwargs): @mock.patch('cinder.backup.drivers.ceph.rbd', spec=object) diff --git a/cinder/tests/test_netapp_nfs.py b/cinder/tests/test_netapp_nfs.py index 74ec874ee..0078388ef 100644 --- a/cinder/tests/test_netapp_nfs.py +++ b/cinder/tests/test_netapp_nfs.py @@ -914,7 +914,7 @@ class NetappDirectCmodeNfsDriverOnlyTestCase(test.TestCase): # Raise error as if the copyoffload file can not be found drv._clone_file_dst_exists = mock.Mock(side_effect=OSError()) - # Verify the orignal error is propagated + # Verify the original error is propagated self.assertRaises(OSError, drv._try_copyoffload, context, volume, image_service, image_id) diff --git a/cinder/tests/test_policy.py b/cinder/tests/test_policy.py index cca5e9e03..ac5591361 100644 --- a/cinder/tests/test_policy.py +++ b/cinder/tests/test_policy.py @@ -198,7 +198,7 @@ class ContextIsAdminPolicyTestCase(test.TestCase): self.assertTrue(ctx.is_admin) def test_custom_admin_role_is_admin(self): - # define explict rules for context_is_admin + # define explicit rules for context_is_admin rules = { 'context_is_admin': [["role:administrator"], ["role:johnny-admin"]] } diff --git a/cinder/tests/test_rbd.py b/cinder/tests/test_rbd.py index 8348a2d10..589787e62 100644 --- a/cinder/tests/test_rbd.py +++ b/cinder/tests/test_rbd.py @@ -66,7 +66,7 @@ def common_mocks(f): """Decorator to set mocks common to all tests. The point of doing these mocks here is so that we don't accidentally set - mocks that can't/dont't get unset. + mocks that can't/don't get unset. """ def _common_inner_inner1(inst, *args, **kwargs): @mock.patch('cinder.volume.drivers.rbd.RBDVolumeProxy') diff --git a/cinder/volume/drivers/vmware/vim.py b/cinder/volume/drivers/vmware/vim.py index 2135a5672..82fc65ebd 100644 --- a/cinder/volume/drivers/vmware/vim.py +++ b/cinder/volume/drivers/vmware/vim.py @@ -35,7 +35,7 @@ def get_moref(value, type): :param value: value for the managed object :param type: type of the managed object - :return: Managed object reference with with input value and type + :return: Managed object reference with input value and type """ moref = suds.sudsobject.Property(value) moref._type = type diff --git a/cinder/volume/flows/manager/create_volume.py b/cinder/volume/flows/manager/create_volume.py index 9f1ea6a24..8fda97f33 100644 --- a/cinder/volume/flows/manager/create_volume.py +++ b/cinder/volume/flows/manager/create_volume.py @@ -254,7 +254,7 @@ class ExtractVolumeSpecTask(flow_utils.CinderTask): 'type': 'source_vol', }) elif kwargs.get('image_id'): - # We are making a image based volume instead of a raw volume. + # We are making an image based volume instead of a raw volume. image_href = kwargs['image_id'] image_service, image_id = get_remote_image_service(context, image_href) @@ -329,7 +329,7 @@ class CreateVolumeFromSpecTask(flow_utils.CinderTask): """Enable bootable flag and properly handle glance metadata. Caller should provide one and only one of snapshot_id,source_volid - and image_id. If an image_id specified, a image_meta should also be + and image_id. If an image_id specified, an image_meta should also be provided, otherwise will be treated as an empty dictionary. """ diff --git a/cinder/wsgi.py b/cinder/wsgi.py index b76607464..bcea766ee 100644 --- a/cinder/wsgi.py +++ b/cinder/wsgi.py @@ -310,7 +310,7 @@ class Application(object): res = exc.HTTPForbidden(explanation='Nice try') # Option 3: a webob Response object (in case you need to play with - # headers, or you want to be treated like an iterable, or or or) + # headers, or you want to be treated like an iterable) res = Response(); res.app_iter = open('somefile')