Skip to content

Commit 7402822

Browse files
committedOct 2, 2023
[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
1 parent 87d4807 commit 7402822

25 files changed

+49
-36
lines changed
 

‎HACKING.rst

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

‎doc/dictionary.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ot
2+
hda
3+
ser
4+
ned
5+
deques
6+
affinitized
7+
noes
8+
Wile

‎doc/source/configuration/policy-concepts.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ overridden in the policy.yaml file but scope is not override-able.
254254
#. PROJECT_READER: ``reader`` role on ``project`` scope. This is used to perform
255255
read-only operation within project. For example: Get server.
256256

257-
#. 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
257+
#. 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
258258
with `member` role legacy admin can continue to access those APIs.
259259

260260
#. 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

‎nova/api/openstack/compute/servers.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ def _process_bdms_for_create(
487487
:param target: The target dict for ``context.can`` policy checks
488488
:param server_dict: The POST /servers request body "server" entry
489489
:param create_kwargs: dict that gets populated by this method and
490-
passed to nova.comptue.api.API.create()
490+
passed to nova.compute.api.API.create()
491491
:raises: webob.exc.HTTPBadRequest if the request parameters are invalid
492492
:raises: nova.exception.Forbidden if a policy check fails
493493
"""
@@ -538,7 +538,7 @@ def _process_networks_for_create(
538538
:param target: The target dict for ``context.can`` policy checks
539539
:param server_dict: The POST /servers request body "server" entry
540540
:param create_kwargs: dict that gets populated by this method and
541-
passed to nova.comptue.api.API.create()
541+
passed to nova.compute.api.API.create()
542542
:raises: webob.exc.HTTPBadRequest if the request parameters are invalid
543543
:raises: nova.exception.Forbidden if a policy check fails
544544
"""
@@ -644,7 +644,7 @@ def _process_hosts_for_create(
644644
:param target: The target dict for ``context.can`` policy checks
645645
:param server_dict: The POST /servers request body "server" entry
646646
:param create_kwargs: dict that gets populated by this method and
647-
passed to nova.comptue.api.API.create()
647+
passed to nova.compute.api.API.create()
648648
:param host: Forced host of availability_zone
649649
:param node: Forced node of availability_zone
650650
:raise: webob.exc.HTTPBadRequest if the request parameters are invalid

‎nova/api/validation/extra_specs/hw.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
name='hw:locked_memory',
168168
description=(
169169
'Determine if **guest** (instance) memory should be locked '
170-
'preventing swaping. This is required in rare cases for device '
170+
'preventing swapping. This is required in rare cases for device '
171171
'DMA transfers. Only supported by the libvirt virt driver.'
172172
),
173173
value={

‎nova/conductor/tasks/migrate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ def replace_allocation_with_migration(context, instance, migration):
3434
:raises: ConsumerAllocationRetrievalFailed if reading the current
3535
allocation from placement fails
3636
:raises: ComputeHostNotFound if the host of the instance is not found in
37-
the databse
37+
the database
3838
:raises: AllocationMoveFailed if moving the allocation from the
3939
instance.uuid to the migration.uuid fails due to parallel
4040
placement operation on the instance consumer
41-
:raises: NoValidHost if placement rejectes the update for other reasons
41+
:raises: NoValidHost if placement rejects the update for other reasons
4242
(e.g. not enough resources)
4343
:returns: (source_compute_node, migration_allocation)
4444
"""

‎nova/conf/scheduler.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@
367367
cfg.FloatOpt("ram_weight_multiplier",
368368
default=1.0,
369369
help="""
370-
RAM weight multipler ratio.
370+
RAM weight multiplier ratio.
371371
372372
This option determines how hosts with more or less available RAM are weighed. A
373373
positive value will result in the scheduler preferring hosts with more
@@ -383,7 +383,7 @@
383383
384384
Possible values:
385385
386-
* An integer or float value, where the value corresponds to the multipler
386+
* An integer or float value, where the value corresponds to the multiplier
387387
ratio for this weigher.
388388
389389
Related options:
@@ -403,7 +403,7 @@
403403
404404
Possible values:
405405
406-
* An integer or float value, where the value corresponds to the multipler
406+
* An integer or float value, where the value corresponds to the multiplier
407407
ratio for this weigher.
408408
409409
Related options:
@@ -413,7 +413,7 @@
413413
cfg.FloatOpt("disk_weight_multiplier",
414414
default=1.0,
415415
help="""
416-
Disk weight multipler ratio.
416+
Disk weight multiplier ratio.
417417
418418
Multiplier used for weighing free disk space. Negative numbers mean to
419419
stack vs spread.
@@ -423,7 +423,7 @@
423423
424424
Possible values:
425425
426-
* An integer or float value, where the value corresponds to the multipler
426+
* An integer or float value, where the value corresponds to the multiplier
427427
ratio for this weigher.
428428
"""),
429429
cfg.FloatOpt("hypervisor_version_weight_multiplier",
@@ -517,7 +517,7 @@
517517
cfg.FloatOpt("io_ops_weight_multiplier",
518518
default=-1.0,
519519
help="""
520-
IO operations weight multipler ratio.
520+
IO operations weight multiplier ratio.
521521
522522
This option determines how hosts with differing workloads are weighed. Negative
523523
values, such as the default, will result in the scheduler preferring hosts with
@@ -533,7 +533,7 @@
533533
534534
Possible values:
535535
536-
* An integer or float value, where the value corresponds to the multipler
536+
* An integer or float value, where the value corresponds to the multiplier
537537
ratio for this weigher.
538538
539539
Related options:

‎nova/db/main/api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4349,7 +4349,7 @@ def _archive_deleted_rows_for_table(
43494349
shadow table.
43504350
43514351
Will also follow FK constraints and archive all referring rows.
4352-
Example: archving a record from the 'instances' table will also archive
4352+
Example: archiving a record from the 'instances' table will also archive
43534353
the 'instance_extra' record before archiving the 'instances' record.
43544354
43554355
:returns: 3-item tuple:

‎nova/pci/manager.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ def update_devices_from_hypervisor_resources(
137137
# The raised exception is misleading as the problem is not with
138138
# the whitelist config but with the host PCI device reported by
139139
# libvirt. The code that matches the host PCI device to the
140-
# withelist spec reuses the WhitelistPciAddress object to parse
140+
# whitelist spec reuses the WhitelistPciAddress object to parse
141141
# the host PCI device address. That parsing can fail if the
142142
# PCI address has a 32 bit domain. But this should not prevent
143143
# processing the rest of the devices. So we simply skip this
144144
# device and continue.
145145
# Please note that this except block does not ignore the
146146
# invalid whitelist configuration. The whitelist config has
147147
# already been parsed or rejected in case it was invalid. At
148-
# this point the self.dev_filter representes the parsed and
148+
# this point the self.dev_filter represents the parsed and
149149
# validated whitelist config.
150150
LOG.debug(
151151
'Skipping PCI device %s reported by the hypervisor: %s',

‎nova/policies/servers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
DEPRECATED_REASON = """
3131
Policies for showing flavor extra specs in server APIs response is
32-
seprated as new policy. This policy is deprecated only for that but
32+
separated as new policy. This policy is deprecated only for that but
3333
not for list extra specs and showing it in flavor API response.
3434
"""
3535

‎nova/policy.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def init(policy_file=None, rules=None, default_rule=None, use_conf=True,
8484
rules=rules,
8585
default_rule=default_rule,
8686
use_conf=use_conf)
87-
# NOTE(gmann): Explictly disable the warnings for policies
87+
# NOTE(gmann): Explicitly disable the warnings for policies
8888
# changing their default check_str. During policy-defaults-refresh
8989
# work, all the policy defaults have been changed and warning for
9090
# 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):
181181
if not exc:
182182
exc = exception.PolicyNotAuthorized
183183

184-
# Legacy fallback for emtpy target from context.can()
184+
# Legacy fallback for empty target from context.can()
185185
# should be removed once we improve testing and scope checks
186186
if target is None:
187187
target = default_target(context)

‎nova/scheduler/weights/metrics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
This weigher can compute the weight based on the compute node host's various
2020
metrics. The to-be weighed metrics and their weighing ratio are specified
21-
in the configuration file as the followings:
21+
in the configuration file as follows:
2222
2323
[metrics]
2424
weight_setting = name1=1.0, name2=-1.0

‎nova/service.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def start(self):
148148
# See https://bugs.python.org/issue6721 for more information.
149149
# With python 3.7, it would be possible for oslo.db to make use of the
150150
# os.register_at_fork() method to reinitialize its lock. Until we
151-
# require python 3.7 as a mininum version, we must handle the situation
151+
# require python 3.7 as a minimum version, we must handle the situation
152152
# outside of oslo.db.
153153
context.CELL_CACHE = {}
154154

@@ -424,7 +424,7 @@ def start(self):
424424
# See https://bugs.python.org/issue6721 for more information.
425425
# With python 3.7, it would be possible for oslo.db to make use of the
426426
# os.register_at_fork() method to reinitialize its lock. Until we
427-
# require python 3.7 as a mininum version, we must handle the situation
427+
# require python 3.7 as a minimum version, we must handle the situation
428428
# outside of oslo.db.
429429
context.CELL_CACHE = {}
430430

@@ -438,7 +438,7 @@ def start(self):
438438
service_ref = _create_service_ref(self, ctxt)
439439
except (exception.ServiceTopicExists,
440440
exception.ServiceBinaryExists):
441-
# NOTE(danms): If we race to create a record wth a sibling,
441+
# NOTE(danms): If we race to create a record with a sibling,
442442
# don't fail here.
443443
service_ref = objects.Service.get_by_host_and_binary(
444444
ctxt, self.host, self.binary)

‎nova/tests/functional/db/test_virtual_interface.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def test_migration_attach_in_progress(self):
236236
match, done = virtual_interface.fill_virtual_interface_list(
237237
self.context, 5)
238238

239-
# I don't know whats going on so instance VirtualInterfaceList
239+
# I don't know what's going on so instance VirtualInterfaceList
240240
# should stay untouched.
241241
self.assertEqual(1, match)
242242
self.assertEqual(0, done)

‎nova/virt/hyperv/vmops.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ def _get_instance_vnuma_config(self, instance, image_meta):
477477
reason=_("Hyper-V does not support CPU pinning."),
478478
instance_id=instance.uuid)
479479

480-
# validate that the requested NUMA topology is not asymetric.
480+
# validate that the requested NUMA topology is not asymmetric.
481481
# e.g.: it should be like: (X cpus, X cpus, Y cpus), where X == Y.
482482
# same with memory.
483483
for cell in instance_topology.cells:

‎nova/virt/libvirt/machine_type_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def _check_update_to_existing_type(
9090
) -> None:
9191
"""Check the update to an existing machine type
9292
93-
The aim here is to block operators from moving between the underying
93+
The aim here is to block operators from moving between the underlying
9494
machine types, between versioned and aliased types or to an older version
9595
of the same type during an update.
9696

‎nova/virt/libvirt/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ def mdev_name2uuid(mdev_name: str) -> str:
634634
:returns: string containing the uuid
635635
"""
636636
mdev_uuid = mdev_name[5:].replace('_', '-')
637-
# Unconditionnally remove the PCI address from the name
637+
# Unconditionally remove the PCI address from the name
638638
mdev_uuid = mdev_uuid[:36]
639639
return str(uuid.UUID(mdev_uuid))
640640

‎releasenotes/notes/add-hw_input_bus-image-metadata-prop-059bea459dec618e.yaml

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

‎releasenotes/notes/bp-ironic-boot-from-volume-cfb98c733cf09a92.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ upgrade:
99
- |
1010
The required ironic API version is updated to 1.32. The ironic service
1111
must be upgraded to an ironic release > 8.0 before nova is upgraded,
12-
otherwise all ironic intergration will fail.
12+
otherwise all ironic integration will fail.

‎releasenotes/notes/cpu-resources-d4e6a0c12681fa87.yaml

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

‎releasenotes/notes/releasenotes/notes/bochs-ffaa289da97d08c8.yaml

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

‎releasenotes/notes/remove-default-cputune-shares-values-85d5ddf4b8e24eaa.yaml

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

‎releasenotes/notes/stable_rescue_bfv-cd0e9f0f7e9eaa25.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ features:
66
instance also reports the ``COMPUTE_RESCUE_BFV`` trait such as the libvirt
77
driver.
88
9-
No changes have been made to the request or reponse parameters of the
9+
No changes have been made to the request or response parameters of the
1010
rescue API itself.

‎releasenotes/source/newton.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ Upgrade Notes
760760
``/opt/stack/data/nova/instances/34198248-5541-4d52-a0b4-a6635a7802dd/``.
761761

762762
In Newton backward compatibility is dropped. For instances that haven't
763-
been restarted since Folsom and earlier maintanance should be scheduled
763+
been restarted since Folsom and earlier maintenance should be scheduled
764764
before upgrade(stop, rename directory to instance.uuid, then start) so Nova
765765
will start using new paths for instances.
766766

‎setup.cfg

+5
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,8 @@ follow_imports = skip
101101
incremental = true
102102
check_untyped_defs = true
103103
warn_unused_ignores = true
104+
105+
[codespell]
106+
skip = *.po,*.js,*.css,*.html,*.svg,HACKING.py,./doc/build*,*_static*,doc/dictionary.txt
107+
count =
108+
quiet-level = 4

0 commit comments

Comments
 (0)
Please sign in to comment.