[codespell] start fixing all the typos

this is the inital patch of applying codespell to nova.
codespell is a programing focused spellchecker that
looks for common typos and corrects them.

i am breaking this into multiple commits to make it simpler
to read and will automate the execution of codespell
at the end of the series.

Change-Id: If24a6c0a890f713545faa2d44b069c352655274e
This commit is contained in:
Sean Mooney 2023-10-03 00:51:35 +01:00
parent 87d4807848
commit 7402822f0b
25 changed files with 49 additions and 36 deletions

View File

@ -63,7 +63,7 @@ Nova Specific Commandments
assertNotRegexpMatches
- [N362] Imports for privsep modules should be specific. Use "import nova.privsep.path",
not "from nova.privsep import path". This ensures callers know that the method they're
calling is using priviledge escalation.
calling is using privilege escalation.
- [N363] Disallow ``(not_a_tuple)`` because you meant ``(a_tuple_of_one,)``.
- [N364] Check non-existent mock assertion methods and attributes.
- [N365] Check misuse of assertTrue/assertIsNone.

8
doc/dictionary.txt Normal file
View File

@ -0,0 +1,8 @@
ot
hda
ser
ned
deques
affinitized
noes
Wile

View File

@ -254,7 +254,7 @@ overridden in the policy.yaml file but scope is not override-able.
#. PROJECT_READER: ``reader`` role on ``project`` scope. This is used to perform
read-only operation within project. For example: Get server.
#. PROJECT_MEMBER_OR_ADMIN: ``admin`` or ``member`` role on ``project`` scope. Such policy rules are default to most of the owner level APIs and aling
#. PROJECT_MEMBER_OR_ADMIN: ``admin`` or ``member`` role on ``project`` scope. Such policy rules are default to most of the owner level APIs and align
with `member` role legacy admin can continue to access those APIs.
#. PROJECT_READER_OR_ADMIN: ``admin`` or ``reader`` role on ``project`` scope. Such policy rules are default to most of the read only APIs so that legacy

View File

@ -487,7 +487,7 @@ class ServersController(wsgi.Controller):
:param target: The target dict for ``context.can`` policy checks
:param server_dict: The POST /servers request body "server" entry
:param create_kwargs: dict that gets populated by this method and
passed to nova.comptue.api.API.create()
passed to nova.compute.api.API.create()
:raises: webob.exc.HTTPBadRequest if the request parameters are invalid
:raises: nova.exception.Forbidden if a policy check fails
"""
@ -538,7 +538,7 @@ class ServersController(wsgi.Controller):
:param target: The target dict for ``context.can`` policy checks
:param server_dict: The POST /servers request body "server" entry
:param create_kwargs: dict that gets populated by this method and
passed to nova.comptue.api.API.create()
passed to nova.compute.api.API.create()
:raises: webob.exc.HTTPBadRequest if the request parameters are invalid
:raises: nova.exception.Forbidden if a policy check fails
"""
@ -644,7 +644,7 @@ class ServersController(wsgi.Controller):
:param target: The target dict for ``context.can`` policy checks
:param server_dict: The POST /servers request body "server" entry
:param create_kwargs: dict that gets populated by this method and
passed to nova.comptue.api.API.create()
passed to nova.compute.api.API.create()
:param host: Forced host of availability_zone
:param node: Forced node of availability_zone
:raise: webob.exc.HTTPBadRequest if the request parameters are invalid

View File

@ -167,7 +167,7 @@ hugepage_validators = [
name='hw:locked_memory',
description=(
'Determine if **guest** (instance) memory should be locked '
'preventing swaping. This is required in rare cases for device '
'preventing swapping. This is required in rare cases for device '
'DMA transfers. Only supported by the libvirt virt driver.'
),
value={

View File

@ -34,11 +34,11 @@ def replace_allocation_with_migration(context, instance, migration):
:raises: ConsumerAllocationRetrievalFailed if reading the current
allocation from placement fails
:raises: ComputeHostNotFound if the host of the instance is not found in
the databse
the database
:raises: AllocationMoveFailed if moving the allocation from the
instance.uuid to the migration.uuid fails due to parallel
placement operation on the instance consumer
:raises: NoValidHost if placement rejectes the update for other reasons
:raises: NoValidHost if placement rejects the update for other reasons
(e.g. not enough resources)
:returns: (source_compute_node, migration_allocation)
"""

View File

@ -367,7 +367,7 @@ Possible values:
cfg.FloatOpt("ram_weight_multiplier",
default=1.0,
help="""
RAM weight multipler ratio.
RAM weight multiplier ratio.
This option determines how hosts with more or less available RAM are weighed. A
positive value will result in the scheduler preferring hosts with more
@ -383,7 +383,7 @@ enabled.
Possible values:
* An integer or float value, where the value corresponds to the multipler
* An integer or float value, where the value corresponds to the multiplier
ratio for this weigher.
Related options:
@ -403,7 +403,7 @@ enabled.
Possible values:
* An integer or float value, where the value corresponds to the multipler
* An integer or float value, where the value corresponds to the multiplier
ratio for this weigher.
Related options:
@ -413,7 +413,7 @@ Related options:
cfg.FloatOpt("disk_weight_multiplier",
default=1.0,
help="""
Disk weight multipler ratio.
Disk weight multiplier ratio.
Multiplier used for weighing free disk space. Negative numbers mean to
stack vs spread.
@ -423,7 +423,7 @@ is enabled.
Possible values:
* An integer or float value, where the value corresponds to the multipler
* An integer or float value, where the value corresponds to the multiplier
ratio for this weigher.
"""),
cfg.FloatOpt("hypervisor_version_weight_multiplier",
@ -517,7 +517,7 @@ Related options:
cfg.FloatOpt("io_ops_weight_multiplier",
default=-1.0,
help="""
IO operations weight multipler ratio.
IO operations weight multiplier ratio.
This option determines how hosts with differing workloads are weighed. Negative
values, such as the default, will result in the scheduler preferring hosts with
@ -533,7 +533,7 @@ is enabled.
Possible values:
* An integer or float value, where the value corresponds to the multipler
* An integer or float value, where the value corresponds to the multiplier
ratio for this weigher.
Related options:

View File

@ -4349,7 +4349,7 @@ def _archive_deleted_rows_for_table(
shadow table.
Will also follow FK constraints and archive all referring rows.
Example: archving a record from the 'instances' table will also archive
Example: archiving a record from the 'instances' table will also archive
the 'instance_extra' record before archiving the 'instances' record.
:returns: 3-item tuple:

View File

@ -137,7 +137,7 @@ class PciDevTracker(object):
# The raised exception is misleading as the problem is not with
# the whitelist config but with the host PCI device reported by
# libvirt. The code that matches the host PCI device to the
# withelist spec reuses the WhitelistPciAddress object to parse
# whitelist spec reuses the WhitelistPciAddress object to parse
# the host PCI device address. That parsing can fail if the
# PCI address has a 32 bit domain. But this should not prevent
# processing the rest of the devices. So we simply skip this
@ -145,7 +145,7 @@ class PciDevTracker(object):
# Please note that this except block does not ignore the
# invalid whitelist configuration. The whitelist config has
# already been parsed or rejected in case it was invalid. At
# this point the self.dev_filter representes the parsed and
# this point the self.dev_filter represents the parsed and
# validated whitelist config.
LOG.debug(
'Skipping PCI device %s reported by the hypervisor: %s',

View File

@ -29,7 +29,7 @@ DEPRECATED_POLICY = policy.DeprecatedRule(
DEPRECATED_REASON = """
Policies for showing flavor extra specs in server APIs response is
seprated as new policy. This policy is deprecated only for that but
separated as new policy. This policy is deprecated only for that but
not for list extra specs and showing it in flavor API response.
"""

View File

@ -84,7 +84,7 @@ def init(policy_file=None, rules=None, default_rule=None, use_conf=True,
rules=rules,
default_rule=default_rule,
use_conf=use_conf)
# NOTE(gmann): Explictly disable the warnings for policies
# NOTE(gmann): Explicitly disable the warnings for policies
# changing their default check_str. During policy-defaults-refresh
# work, all the policy defaults have been changed and warning for
# each policy started filling the logs limit for various tool.
@ -181,7 +181,7 @@ def authorize(context, action, target=None, do_raise=True, exc=None):
if not exc:
exc = exception.PolicyNotAuthorized
# Legacy fallback for emtpy target from context.can()
# Legacy fallback for empty target from context.can()
# should be removed once we improve testing and scope checks
if target is None:
target = default_target(context)

View File

@ -18,7 +18,7 @@ Metrics Weigher. Weigh hosts by their metrics.
This weigher can compute the weight based on the compute node host's various
metrics. The to-be weighed metrics and their weighing ratio are specified
in the configuration file as the followings:
in the configuration file as follows:
[metrics]
weight_setting = name1=1.0, name2=-1.0

View File

@ -148,7 +148,7 @@ class Service(service.Service):
# See https://bugs.python.org/issue6721 for more information.
# With python 3.7, it would be possible for oslo.db to make use of the
# os.register_at_fork() method to reinitialize its lock. Until we
# require python 3.7 as a mininum version, we must handle the situation
# require python 3.7 as a minimum version, we must handle the situation
# outside of oslo.db.
context.CELL_CACHE = {}
@ -424,7 +424,7 @@ class WSGIService(service.Service):
# See https://bugs.python.org/issue6721 for more information.
# With python 3.7, it would be possible for oslo.db to make use of the
# os.register_at_fork() method to reinitialize its lock. Until we
# require python 3.7 as a mininum version, we must handle the situation
# require python 3.7 as a minimum version, we must handle the situation
# outside of oslo.db.
context.CELL_CACHE = {}
@ -438,7 +438,7 @@ class WSGIService(service.Service):
service_ref = _create_service_ref(self, ctxt)
except (exception.ServiceTopicExists,
exception.ServiceBinaryExists):
# NOTE(danms): If we race to create a record wth a sibling,
# NOTE(danms): If we race to create a record with a sibling,
# don't fail here.
service_ref = objects.Service.get_by_host_and_binary(
ctxt, self.host, self.binary)

View File

@ -236,7 +236,7 @@ class VirtualInterfaceListMigrationTestCase(
match, done = virtual_interface.fill_virtual_interface_list(
self.context, 5)
# I don't know whats going on so instance VirtualInterfaceList
# I don't know what's going on so instance VirtualInterfaceList
# should stay untouched.
self.assertEqual(1, match)
self.assertEqual(0, done)

View File

@ -477,7 +477,7 @@ class VMOps(object):
reason=_("Hyper-V does not support CPU pinning."),
instance_id=instance.uuid)
# validate that the requested NUMA topology is not asymetric.
# validate that the requested NUMA topology is not asymmetric.
# e.g.: it should be like: (X cpus, X cpus, Y cpus), where X == Y.
# same with memory.
for cell in instance_topology.cells:

View File

@ -90,7 +90,7 @@ def _check_update_to_existing_type(
) -> None:
"""Check the update to an existing machine type
The aim here is to block operators from moving between the underying
The aim here is to block operators from moving between the underlying
machine types, between versioned and aliased types or to an older version
of the same type during an update.

View File

@ -634,7 +634,7 @@ def mdev_name2uuid(mdev_name: str) -> str:
:returns: string containing the uuid
"""
mdev_uuid = mdev_name[5:].replace('_', '-')
# Unconditionnally remove the PCI address from the name
# Unconditionally remove the PCI address from the name
mdev_uuid = mdev_uuid[:36]
return str(uuid.UUID(mdev_uuid))

View File

@ -7,4 +7,4 @@ features:
on compute nodes using the libvirt virt driver. Two values are currently
accepted: ``usb`` and ``virtio``. This image metadata property effectively
replaced the ``hw_pointer_model`` image metadata property, which is
nontheless retained for backwards compatibility purposes.
nonetheless retained for backwards compatibility purposes.

View File

@ -9,4 +9,4 @@ upgrade:
- |
The required ironic API version is updated to 1.32. The ironic service
must be upgraded to an ironic release > 8.0 before nova is upgraded,
otherwise all ironic intergration will fail.
otherwise all ironic integration will fail.

View File

@ -25,7 +25,7 @@ features:
The ``[compute] cpu_shared_set`` configuration option will now be used to
configure the host CPUs that should be used for ``VCPU`` inventory,
replacing the deprecated ``vcpu_pin_set`` option. Refer to the help text of
the ``[compute] cpu_shared_set`` config option for more infomration.
the ``[compute] cpu_shared_set`` config option for more information.
- |
A new configuration option, ``[workarounds] disable_fallback_pcpu_query``,
has been added. When creating or moving pinned instances, the scheduler will

View File

@ -4,4 +4,4 @@ features:
Add support for the ``bochs`` libvirt video model. This is a
legacy-free video model that is best suited for UEFI guests. In
limited cases (e.g. if the guest does not depend on direct VGA
hardware access), it can be useable for BIOS guests as well.
hardware access), it can be usable for BIOS guests as well.

View File

@ -2,7 +2,7 @@ upgrade:
- |
In the libvirt driver, the default value of the ``<cputune><shares>``
element has been removed, and is now left to libvirt to decide. This is
because allowed values are platform dependant, and the previous code was
because allowed values are platform dependent, and the previous code was
not guaranteed to be supported on all platforms. If any of your flavors are
using the quota:cpu_shares extra spec, you may need to resize to a
supported value before upgrading.

View File

@ -6,5 +6,5 @@ features:
instance also reports the ``COMPUTE_RESCUE_BFV`` trait such as the libvirt
driver.
No changes have been made to the request or reponse parameters of the
No changes have been made to the request or response parameters of the
rescue API itself.

View File

@ -760,7 +760,7 @@ Upgrade Notes
``/opt/stack/data/nova/instances/34198248-5541-4d52-a0b4-a6635a7802dd/``.
In Newton backward compatibility is dropped. For instances that haven't
been restarted since Folsom and earlier maintanance should be scheduled
been restarted since Folsom and earlier maintenance should be scheduled
before upgrade(stop, rename directory to instance.uuid, then start) so Nova
will start using new paths for instances.

View File

@ -101,3 +101,8 @@ follow_imports = skip
incremental = true
check_untyped_defs = true
warn_unused_ignores = true
[codespell]
skip = *.po,*.js,*.css,*.html,*.svg,HACKING.py,./doc/build*,*_static*,doc/dictionary.txt
count =
quiet-level = 4