]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix typo/misspelled words
authorZhiteng Huang <zhithuang@ebaysf.com>
Tue, 3 Dec 2013 14:49:12 +0000 (22:49 +0800)
committerZhiteng Huang <zhithuang@ebaysf.com>
Tue, 3 Dec 2013 14:49:12 +0000 (22:49 +0800)
Fix type/misspelled words found by this handy tools:
https://github.com/lyda/misspell-check

Some 'typo's were intentional since they are part of function name,
so they are left alone.

Change-Id: I4badda869521659b541d018727a6f71f518e2ee0

21 files changed:
cinder/brick/initiator/connector.py
cinder/taskflow/utils.py
cinder/tests/api/contrib/test_services.py
cinder/tests/api/test_router.py
cinder/tests/api/v1/test_limits.py
cinder/tests/api/v2/test_limits.py
cinder/tests/test_huawei_hvs.py
cinder/tests/test_netapp_nfs.py
cinder/tests/test_volume.py
cinder/tests/test_volume_types.py
cinder/utils.py
cinder/volume/driver.py
cinder/volume/drivers/huawei/rest_common.py
cinder/volume/drivers/huawei/ssh_common.py
cinder/volume/drivers/lvm.py
cinder/volume/drivers/netapp/nfs.py
cinder/volume/drivers/rbd.py
cinder/volume/drivers/vmware/vmdk.py
cinder/volume/flows/create_volume/__init__.py
cinder/volume/flows/utils.py
doc/source/images/rpc/arch.svg

index 306d18de0e42c033eb3b45329b6c34c45a5d645a..743d1aff91d9e9c158e0c6974183554f80ee5418 100644 (file)
@@ -418,7 +418,7 @@ class ISCSIConnector(InitiatorConnector):
                                    check_exit_code=[0, 255])
             except putils.ProcessExecutionError as err:
                 #as this might be one of many paths,
-                #only set successfull logins to startup automatically
+                #only set successful logins to startup automatically
                 if err.exit_code in [15]:
                     self._iscsiadm_update(connection_properties,
                                           "node.startup",
index 44a526c6df6fe1c9813ec17dc02c961c4bd0ba8f..cb66fef98c49e3a749e877ee34c0a534473f2ff8 100644 (file)
@@ -263,7 +263,7 @@ class Runner(object):
 
 class TransitionNotifier(object):
     """A utility helper class that can be used to subscribe to
-    notifications of events occuring as well as allow a entity to post said
+    notifications of events occurring as well as allow a entity to post said
     notifications to subscribers.
     """
 
index 5e4bf5524dadafdcef3931c29c343cda485c6071..420fcd8545561bdf5a0075820238fafb06b4acd1 100644 (file)
@@ -62,7 +62,7 @@ class FakeRequest(object):
 
 
 # NOTE(uni): deprecating service request key, binary takes precedence
-# Still keeping service key here for API compability sake.
+# Still keeping service key here for API compatibility sake.
 class FakeRequestWithService(object):
         environ = {"cinder.context": context.get_admin_context()}
         GET = {"service": "cinder-volume"}
@@ -79,7 +79,7 @@ class FakeRequestWithHost(object):
 
 
 # NOTE(uni): deprecating service request key, binary takes precedence
-# Still keeping service key here for API compability sake.
+# Still keeping service key here for API compatibility sake.
 class FakeRequestWithHostService(object):
         environ = {"cinder.context": context.get_admin_context()}
         GET = {"host": "host1", "service": "cinder-volume"}
index 9a3a362c6fab4bb640b79f46459ad0460df520cb..0aebeaacee5c4cb01ff794d994da491004a21f36 100644 (file)
@@ -63,15 +63,15 @@ class VolumeRouterTestCase(test.TestCase):
         self.assertEqual(200, response.status_int)
 
     def test_versions_action_args_index(self):
-        request_enviroment = {'PATH_INFO': '/'}
+        request_environment = {'PATH_INFO': '/'}
         resource = versions.Versions()
-        result = resource.get_action_args(request_enviroment)
+        result = resource.get_action_args(request_environment)
         self.assertEqual(result['action'], 'index')
 
     def test_versions_action_args_multi(self):
-        request_enviroment = {'PATH_INFO': '/fake/path'}
+        request_environment = {'PATH_INFO': '/fake/path'}
         resource = versions.Versions()
-        result = resource.get_action_args(request_enviroment)
+        result = resource.get_action_args(request_environment)
         self.assertEqual(result['action'], 'multi')
 
     def test_versions_get_most_recent_update(self):
index 6c7762bb0038fa5c16337d907f4bdb9c0884bced..2f4414a760f0d029c99ec76e12f55024dd0e2bb9 100644 (file)
@@ -568,7 +568,7 @@ class WsgiLimiterTest(BaseLimitTestSuite):
         self.app = limits.WsgiLimiter(TEST_LIMITS)
 
     def _request_data(self, verb, path):
-        """Get data decribing a limit request verb/path."""
+        """Get data describing a limit request verb/path."""
         return jsonutils.dumps({"verb": verb, "path": path})
 
     def _request(self, verb, url, username=None):
index 4422b15fa289af73e5beba1cd042e2535cb8aef8..57c31bb33314dcb70263a732b9f9e81e9181c5c4 100644 (file)
@@ -574,7 +574,7 @@ class WsgiLimiterTest(BaseLimitTestSuite):
         self.app = limits.WsgiLimiter(TEST_LIMITS)
 
     def _request_data(self, verb, path):
-        """Get data decribing a limit request verb/path."""
+        """Get data describing a limit request verb/path."""
         return jsonutils.dumps({"verb": verb, "path": path})
 
     def _request(self, verb, url, username=None):
index 55d2b4a9035e2d7b3b7e161fb70886488405f0a8..be24ba56a11b4c225a9092185ceeb7008e7c4682 100644 (file)
@@ -636,10 +636,10 @@ class HVSRESTiSCSIDriverTestCase(test.TestCase):
         product.appendChild(product_text)
         storage.appendChild(product)
 
-        protocal = doc.createElement('Protocol')
-        protocal_text = doc.createTextNode('iSCSI')
-        protocal.appendChild(protocal_text)
-        storage.appendChild(protocal)
+        protocol = doc.createElement('Protocol')
+        protocol_text = doc.createTextNode('iSCSI')
+        protocol.appendChild(protocol_text)
+        storage.appendChild(protocol)
 
         username = doc.createElement('UserName')
         username_text = doc.createTextNode('admin')
@@ -819,10 +819,10 @@ class HVSRESTFCDriverTestCase(test.TestCase):
         product.appendChild(product_text)
         storage.appendChild(product)
 
-        protocal = doc.createElement('Protocol')
-        protocal_text = doc.createTextNode('FC')
-        protocal.appendChild(protocal_text)
-        storage.appendChild(protocal)
+        protocol = doc.createElement('Protocol')
+        protocol_text = doc.createTextNode('FC')
+        protocol.appendChild(protocol_text)
+        storage.appendChild(protocol)
 
         username = doc.createElement('UserName')
         username_text = doc.createTextNode('admin')
index 61cccf3935c5a3327f80c8de7ae3afb16b0a12d6..948d3c1b49843568a84b9ef99ac5f4b3172189fb 100644 (file)
@@ -73,9 +73,9 @@ class FakeSnapshot(object):
         return self.__dict__[key]
 
 
-class FakeResponce(object):
+class FakeResponse(object):
     def __init__(self, status):
-        """Initialize FakeResponce.
+        """Initialize FakeResponse.
 
         :param status: Either 'failed' or 'passed'
         """
index b0daff791ce50dcbc8a69617ca3faa3bcb4eb35d..2debdffc3c2d568b630602b292c2782f62cb3670 100644 (file)
@@ -984,7 +984,7 @@ class VolumeTestCase(BaseVolumeTestCase):
                           self.context,
                           snapshot_id)
 
-    def test_cant_delete_volume_in_use(self):
+    def test_cannot_delete_volume_in_use(self):
         """Test volume can't be deleted in invalid stats."""
         # create a volume and assign to host
         volume = tests_utils.create_volume(self.context, **self.volume_params)
@@ -1029,7 +1029,7 @@ class VolumeTestCase(BaseVolumeTestCase):
         # clean up
         self.volume.delete_volume(self.context, volume['id'])
 
-    def test_cant_force_delete_attached_volume(self):
+    def test_cannot_force_delete_attached_volume(self):
         """Test volume can't be force delete in attached state"""
         volume = tests_utils.create_volume(self.context, **self.volume_params)
         self.volume.create_volume(self.context, volume['id'])
@@ -1047,7 +1047,7 @@ class VolumeTestCase(BaseVolumeTestCase):
 
         self.volume.delete_volume(self.context, volume['id'])
 
-    def test_cant_delete_volume_with_snapshots(self):
+    def test_cannot_delete_volume_with_snapshots(self):
         """Test volume can't be deleted with dependent snapshots."""
         volume = tests_utils.create_volume(self.context, **self.volume_params)
         self.volume.create_volume(self.context, volume['id'])
index 6d43925d418a51da304e68a45e07b50b475245cb..b8aebd31a1e4ea705cc07b61ed1879287658cfe2 100644 (file)
@@ -64,7 +64,7 @@ class VolumeTypeTestCase(test.TestCase):
 
         for k, v in self.vol_type1_specs.iteritems():
             self.assertEqual(v, new['extra_specs'][k],
-                             'one of fields doesnt match')
+                             'one of fields does not match')
 
         new_all_vtypes = volume_types.get_all_types(self.ctxt)
         self.assertEqual(len(prev_all_vtypes) + 1,
index 17f566c23b592e35b271dc9948db247665ad7048..d0353a15bd0229e0efae0a0e05d81eda75796ab4 100644 (file)
@@ -221,7 +221,7 @@ class SSHPool(pools.Pool):
                 raise exception.CinderException(msg)
 
             # Paramiko by default sets the socket timeout to 0.1 seconds,
-            # ignoring what we set thru the sshclient. This doesn't help for
+            # ignoring what we set through the sshclient. This doesn't help for
             # keeping long lived connections. Hence we have to bypass it, by
             # overriding it after the transport is initialized. We are setting
             # the sockettimeout to None and setting a keepalive packet so that,
index f6f52f788f3b62ee44ac40ad4c45a9de73566d07..67c3585573921fed86e6fa2d661ee4f4180bc777 100644 (file)
@@ -141,7 +141,7 @@ class VolumeDriver(object):
         self.set_execute(execute)
         self._stats = {}
 
-        # set True by manager after succesful check_for_setup
+        # set True by manager after successful check_for_setup
         self._initialized = False
 
     def set_execute(self, execute):
index 34f684e8bd4031dc53327e62af5ca80027d0e7b6..4d1f57234f049cb412251c972266b21231a6cff6 100644 (file)
@@ -74,7 +74,7 @@ class HVSCommon():
             res = urllib2.urlopen(req).read().decode("utf-8")
             LOG.debug(_('HVS Response Data: %(res)s') % {'res': res})
         except Exception as err:
-            err_msg = _('Bad reponse from server: %s') % err
+            err_msg = _('Bad response from server: %s') % err
             LOG.error(err_msg)
             raise err
 
@@ -218,7 +218,7 @@ class HVSCommon():
     def _get_volume_size(self, poolinfo, volume):
         """Calculate the volume size.
 
-        We should devide the given volume size by 512 for the HVS system
+        We should divide the given volume size by 512 for the HVS system
         caculates volume size with sectors, which is 512 bytes.
         """
 
index 6609809808c8eec1291093222ee10a1c67fb01e4..31cc6d5a2689934453b764bd7b35684c0707df5e 100644 (file)
@@ -1054,7 +1054,7 @@ class TseriesCommon():
             return None
 
     def _get_host_map_info(self, hostid):
-        """Get map infomation of the given host."""
+        """Get map information of the given host."""
 
         cli_cmd = 'showhostmap -host %(hostid)s' % {'hostid': hostid}
         out = self._execute_cli(cli_cmd)
@@ -1259,7 +1259,7 @@ class DoradoCommon(TseriesCommon):
     def _check_conf_file(self):
         """Check the config file, make sure the key elements are set."""
         root = huawei_utils.parse_xml_file(self.xml_conf)
-        # Check login infomation
+        # Check login information
         check_list = ['Storage/ControllerIP0', 'Storage/ControllerIP1',
                       'Storage/UserName', 'Storage/UserPassword']
         for item in check_list:
index 51d3e628f16ea9eddd901054dad842e0dcdfde71..29fc556fca56cf320b894c7d1f1d31b1fa316246 100644 (file)
@@ -416,7 +416,7 @@ class LVMISCSIDriver(LVMVolumeDriver, driver.ISCSIDriver):
     def _create_tgtadm_target(self, iscsi_name, iscsi_target,
                               volume_path, chap_auth, lun=0,
                               check_exit_code=False, old_name=None):
-        # NOTE(jdg): tgt driver has an issue where with alot of activity
+        # NOTE(jdg): tgt driver has an issue where with a lot of activity
         # (or sometimes just randomly) it will get *confused* and attempt
         # to reuse a target ID, resulting in a target already exists error
         # Typically a simple retry will address this
index 6f826979e53cac342050daca10d28ad35c9722ca..e07457c8e028d73ebe935174712b9dfe0c56102e 100644 (file)
@@ -1050,7 +1050,7 @@ class NetAppDirect7modeNfsDriver (NetAppDirectNfsDriver):
         client.set_api_version(major, minor)
 
     def check_for_setup_error(self):
-        """Checks if setup occured properly."""
+        """Checks if setup occurred properly."""
         api_version = self._client.get_api_version()
         if api_version:
             major, minor = api_version
index a6445d63a5eef71f28903bbdb57e3ff9b7ac081b..934d703e246690d6ba3af92688795055ebb133fc 100644 (file)
@@ -371,7 +371,7 @@ class RBDDriver(driver.VolumeDriver):
         if not parent:
             return depth
 
-        # If clone depth was reached, flatten should have occured so if it has
+        # If clone depth was reached, flatten should have occurred so if it has
         # been exceeded then something has gone wrong.
         if depth > CONF.rbd_max_clone_depth:
             raise Exception(_("clone depth exceeds limit of %s") %
index 82b32f7bc504cec10e34b4b6395309b3a91d9160..2d446c1f2fdfc116f5d95eaa314ecf190f0663f3 100644 (file)
@@ -232,7 +232,7 @@ class VMwareEsxVmdkDriver(driver.VolumeDriver):
         return self.volumeops.get_vmfolder(datacenter)
 
     def _select_datastore_summary(self, size_bytes, datastores):
-        """Get best summary from datastore list that can accomodate volume.
+        """Get best summary from datastore list that can accommodate volume.
 
         The implementation selects datastore based on maximum relative
         free space, which is (free_space/total_space) and has free space to
@@ -254,7 +254,7 @@ class VMwareEsxVmdkDriver(driver.VolumeDriver):
                     best_summary = summary
 
         if not best_summary:
-            msg = _("Unable to pick datastore to accomodate %(size)s bytes "
+            msg = _("Unable to pick datastore to accommodate %(size)s bytes "
                     "from the datastores: %(dss)s.")
             LOG.error(msg % {'size': size_bytes, 'dss': datastores})
             raise error_util.VimException(msg %
index ddb4fc919397bccf8f86bdba63fc2c49b338dca0..d4fa8a20c991c491e50e1a02c02527f234ea69bc 100644 (file)
@@ -212,7 +212,7 @@ class ExtractVolumeRequestTask(base.CinderTask):
                 # TODO(harlowja): what happens if the status changes after this
                 # initial snapshot status check occurs??? Seems like someone
                 # could delete the snapshot after this check passes but before
-                # the volume is offically created?
+                # the volume is officially created?
                 raise exception.InvalidSnapshot(reason=msg)
             snapshot_id = snapshot['id']
         return snapshot_id
@@ -235,7 +235,7 @@ class ExtractVolumeRequestTask(base.CinderTask):
                 # TODO(harlowja): what happens if the status changes after this
                 # initial volume status check occurs??? Seems like someone
                 # could delete the volume after this check passes but before
-                # the volume is offically created?
+                # the volume is officially created?
                 raise exception.InvalidVolume(reason=msg)
             source_volid = source_volume['id']
         return source_volid
@@ -475,7 +475,7 @@ class ExtractVolumeRequestTask(base.CinderTask):
         # TODO(joel-coffman): This special handling of snapshots to ensure that
         # their volume type matches the source volume is too convoluted. We
         # should copy encryption metadata from the encrypted volume type to the
-        # volume upon creation and propogate that information to each snapshot.
+        # volume upon creation and propagate that information to each snapshot.
         # This strategy avoid any dependency upon the encrypted volume type.
         if not volume_type and not source_volume and not snapshot:
             volume_type = volume_types.get_default_volume_type()
@@ -595,7 +595,7 @@ class QuotaReserveTask(base.CinderTask):
     Reversion strategy: rollback the quota reservation.
 
     Warning Warning: if the process that is running this reserve and commit
-    process fails (or is killed before the quota is rolled back or commited
+    process fails (or is killed before the quota is rolled back or committed
     it does appear like the quota will never be rolled back). This makes
     software upgrades hard (inflight operations will need to be stopped or
     allowed to complete before the upgrade can occur). *In the future* when
@@ -659,7 +659,7 @@ class QuotaReserveTask(base.CinderTask):
         if not result:
             return
         if context.quota_committed:
-            # The reservations have already been commited and can not be
+            # The reservations have already been committed and can not be
             # rolled back at this point.
             return
         # We actually produced an output that we can revert so lets attempt
@@ -681,7 +681,7 @@ class QuotaCommitTask(base.CinderTask):
     the initial reservation (see: QuotaReserveTask).
 
     Warning Warning: if the process that is running this reserve and commit
-    process fails (or is killed before the quota is rolled back or commited
+    process fails (or is killed before the quota is rolled back or committed
     it does appear like the quota will never be rolled back). This makes
     software upgrades hard (inflight operations will need to be stopped or
     allowed to complete before the upgrade can occur). *In the future* when
@@ -1615,7 +1615,7 @@ def get_api_flow(scheduler_rpcapi, volume_rpcapi, db,
     v_uuid = api_flow.add(EntryCreateTask(db))
     api_flow.add(QuotaCommitTask())
 
-    # If after commiting something fails, ensure we set the db to failure
+    # If after committing something fails, ensure we set the db to failure
     # before reverting any prior tasks.
     api_flow.add(OnFailureChangeStatusTask(db))
 
index f4063766967cb70f87f192f39c239cbbb62fb96e..6c6677e15479743ec1e52b124694735b32521f15 100644 (file)
@@ -30,7 +30,7 @@ def attach_debug_listeners(flow):
 
     These listeners will log when tasks/flows are transitioning from state to
     state so that said states can be seen in the debug log output which is very
-    useful for figuring out where problems are occuring.
+    useful for figuring out where problems are occurring.
     """
 
     def flow_log_change(state, details):
index 13f0b79651ed109ec0bd714e1f6dbd33bf9a7ba9..02e4f5d6403f318a8d58d0079b8cd2200b311a7a 100644 (file)
                                                x="4" dy="1.2em" class="st3">Network<v:newlineChar/></tspan><tspan x="4" dy="1.2em" class="st3">VPN</tspan></text>              </g>\r
                <g id="shape16-56" v:mID="16" v:groupContext="shape" transform="translate(14.4132,-30.9923)">\r
                        <title>Sheet.16</title>\r
-                       <desc>VM instance Security group Volume Snapshot VM image IP addres...</desc>\r
+                       <desc>VM instance Security group Volume Snapshot VM image IP address...</desc>\r
                        <v:textBlock v:margins="rect(4,4,4,4)" v:tabSpace="42.5197"/>\r
                        <v:textRect cx="42.5197" cy="340.209" width="85.04" height="34.0157"/>\r
                        <rect x="0" y="323.201" width="85.0394" height="34.0157" class="st9"/>\r