From 02a954afef0b0ed0f0d20125c3dc1e6287790c8e Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Thu, 16 Aug 2012 15:07:19 -0500 Subject: Fix spelling typos Fixes for: * nova/*py * nova/scheduler/ * nova/compute/*py * nova/api/ec2/ Change-Id: I7bec89b3551eda84d596e55eeba9ccb9d944a5cb --- nova/api/ec2/ec2utils.py | 6 +++--- nova/compute/api.py | 2 +- nova/compute/manager.py | 6 +++--- nova/notifications.py | 4 ++-- nova/scheduler/driver.py | 6 +++--- nova/scheduler/filter_scheduler.py | 2 +- nova/scheduler/filters/all_hosts_filter.py | 2 +- nova/scheduler/host_manager.py | 2 +- nova/scheduler/manager.py | 2 +- nova/test.py | 2 +- nova/utils.py | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/nova/api/ec2/ec2utils.py b/nova/api/ec2/ec2utils.py index e1ea9c6d8..4a7e574ad 100644 --- a/nova/api/ec2/ec2utils.py +++ b/nova/api/ec2/ec2utils.py @@ -138,7 +138,7 @@ def id_to_ec2_inst_id(instance_id): def ec2_inst_id_to_uuid(context, ec2_id): - """"Convert an instance id to uuid.""" + """"Convert an instance id to uuid.""" int_id = ec2_id_to_id(ec2_id) return get_instance_uuid_from_int_id(context, int_id) @@ -168,7 +168,7 @@ def id_to_ec2_vol_id(volume_id): def ec2_vol_id_to_uuid(ec2_id): - """Get the cooresponding UUID for the given ec2-id.""" + """Get the corresponding UUID for the given ec2-id.""" ctxt = context.get_admin_context() # NOTE(jgriffith) first strip prefix to get just the numeric @@ -199,7 +199,7 @@ def get_volume_uuid_from_int_id(context, int_id): def ec2_snap_id_to_uuid(ec2_id): - """Get the cooresponding UUID for the given ec2-id.""" + """Get the corresponding UUID for the given ec2-id.""" ctxt = context.get_admin_context() # NOTE(jgriffith) first strip prefix to get just the numeric diff --git a/nova/compute/api.py b/nova/compute/api.py index e7f9368ea..a04eacd78 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -102,7 +102,7 @@ def check_instance_lock(function): if instance['locked'] and not context.is_admin: raise exception.InstanceIsLocked(instance_uuid=instance['uuid']) # NOTE(danms): at this point, we have verified that either - # theinstance is not locked, or the user is suffiently endowed + # the instance is not locked, or the user is sufficiently endowed # that it doesn't matter. While the following statement may be # interpreted as the "the instance is not locked", it actually # refers to the whole condition. diff --git a/nova/compute/manager.py b/nova/compute/manager.py index c0f37d877..f1bd6ffa7 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -2162,7 +2162,7 @@ class ComputeManager(manager.SchedulerDependentManager): pass def get_instance_disk_info(self, context, instance_name): - """Getting infomation of instance's current disk. + """Getting information of instance's current disk. DEPRECATED: This method is no longer used by any current code, but it is left here to provide backwards compatibility in the rpcapi. @@ -2436,7 +2436,7 @@ class ComputeManager(manager.SchedulerDependentManager): """ if not instance: instance = self.db.instance_get(context, instance_id) - LOG.info(_('Post operation of migraton started'), + LOG.info(_('Post operation of migration started'), instance=instance) # NOTE(tr3buchet): setup networks on destination host @@ -2830,7 +2830,7 @@ class ComputeManager(manager.SchedulerDependentManager): # to allow all the hooks and checks to be performed. self.compute_api.stop(context, db_instance) except Exception: - # Note(maoy): there is no need to propergate the error + # Note(maoy): there is no need to propagate the error # because the same power_state will be retrieved next # time and retried. # For example, there might be another task scheduled. diff --git a/nova/notifications.py b/nova/notifications.py index 913d01cdd..019db3388 100644 --- a/nova/notifications.py +++ b/nova/notifications.py @@ -110,7 +110,7 @@ def send_update_with_states(context, instance, old_vm_state, new_vm_state, if verify_states: # check whether we need to send notification related to state changes fire_update = False - # do not send notification if the confitions for vm and(or) task state + # do not send notification if the conditions for vm and(or) task state # are not satisfied if old_vm_state != new_vm_state: # yes, the vm state is changing: @@ -122,7 +122,7 @@ def send_update_with_states(context, instance, old_vm_state, new_vm_state, fire_update = True if fire_update: - # send either a state change or a regular notificaion + # send either a state change or a regular notification try: _send_instance_update_notification(context, instance, old_vm_state=old_vm_state, old_task_state=old_task_state, diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py index 3a71a6a87..7522ec6bf 100644 --- a/nova/scheduler/driver.py +++ b/nova/scheduler/driver.py @@ -296,7 +296,7 @@ class Scheduler(object): def _live_migration_common_check(self, context, instance_ref, dest): """Live migration common check routine. - Below checkings are followed by + The following checks are based on http://wiki.libvirt.org/page/TodoPreMigrationChecks :param context: security context @@ -313,7 +313,7 @@ class Scheduler(object): if orig_hypervisor != dest_hypervisor: raise exception.InvalidHypervisorType() - # Checkng hypervisor version. + # Checking hypervisor version. orig_hypervisor = oservice_ref['hypervisor_version'] dest_hypervisor = dservice_ref['hypervisor_version'] if orig_hypervisor > dest_hypervisor: @@ -334,7 +334,7 @@ class Scheduler(object): # Getting total used memory and disk of host # It should be sum of memories that are assigned as max value, - # because overcommiting is risky. + # because overcommitting is risky. instance_refs = db.instance_get_all_by_host(context, dest) used = sum([i['memory_mb'] for i in instance_refs]) diff --git a/nova/scheduler/filter_scheduler.py b/nova/scheduler/filter_scheduler.py index ccfbd495e..9eea8dea6 100644 --- a/nova/scheduler/filter_scheduler.py +++ b/nova/scheduler/filter_scheduler.py @@ -217,7 +217,7 @@ class FilterScheduler(driver.Scheduler): return inst def _add_retry_host(self, filter_properties, host): - """Add a retry entry for the selected computep host. In the event that + """Add a retry entry for the selected compute host. In the event that the request gets re-scheduled, this entry will signal that the given host has already been tried. """ diff --git a/nova/scheduler/filters/all_hosts_filter.py b/nova/scheduler/filters/all_hosts_filter.py index e3d18dda8..4e01a624e 100644 --- a/nova/scheduler/filters/all_hosts_filter.py +++ b/nova/scheduler/filters/all_hosts_filter.py @@ -18,7 +18,7 @@ from nova.scheduler import filters class AllHostsFilter(filters.BaseHostFilter): - """NOP host filter. Returns all hosts.""" + """NOOP host filter. Returns all hosts.""" def host_passes(self, host_state, filter_properties): return True diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py index 0403dffdf..fb683d91f 100644 --- a/nova/scheduler/host_manager.py +++ b/nova/scheduler/host_manager.py @@ -174,7 +174,7 @@ class HostState(object): class HostManager(object): """Base HostManager class.""" - # Can be overriden in a subclass + # Can be overridden in a subclass host_state_cls = HostState def __init__(self): diff --git a/nova/scheduler/manager.py b/nova/scheduler/manager.py index 2bc013704..e1030121a 100644 --- a/nova/scheduler/manager.py +++ b/nova/scheduler/manager.py @@ -128,7 +128,7 @@ class SchedulerManager(manager.Manager): reservations) return result except exception.NoValidHost as ex: - # don't reraise + # don't re-raise self._set_vm_state_and_notify('run_instance', {'vm_state': vm_states.ERROR}, context, ex, request_spec) diff --git a/nova/test.py b/nova/test.py index da1f17387..d14d10981 100644 --- a/nova/test.py +++ b/nova/test.py @@ -221,7 +221,7 @@ class TestCase(unittest.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/nova/utils.py b/nova/utils.py index 762708bc4..965f915a1 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -628,7 +628,7 @@ class _InterProcessLock(object): self.unlock() self.lockfile.close() except IOError: - LOG.exception(_("Could not release the aquired lock `%s`") + LOG.exception(_("Could not release the acquired lock `%s`") % self.fname) def trylock(self): -- cgit