Fix codespell violations across the codebase

Add codespell pre-commit hook with a project dictionary
(doc/dictionary.txt) to ignore domain-specific terms such as
"aaS" (as in FPGAaaS / accelerator-as-a-Service).

Fix ~50 spelling errors in source, tests, docs, api-ref, and
release notes. No logic changes; comments and strings only.

Generated-By: claude-code sonnet 4.6
Change-Id: Idf408d3144973f8415092c6304821543a3675039
Signed-off-by: Sean Mooney <work@seanmooney.info>
This commit is contained in:
Sean Mooney
2026-02-24 19:28:46 +00:00
parent 631994f01e
commit ea0cd6ee25
38 changed files with 59 additions and 53 deletions
+5
View File
@@ -39,3 +39,8 @@ repos:
- id: hacking
additional_dependencies: []
exclude: '^(doc|releasenotes|tools)/.*$'
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args: ['--ignore-words=doc/dictionary.txt']
+2 -2
View File
@@ -14,7 +14,7 @@ List Deployables
.. rest_method:: GET /v2/deployables
Lists UUIDs, names, attribute list and more informations for all deployables.
Lists UUIDs, names, attribute list and more information for all deployables.
Normal response codes: 200
@@ -55,7 +55,7 @@ Get One Deployable
.. rest_method:: GET /v2/deployables/{deployable_uuid}
Gets the UUID, name, attribute list and more informations for one deployable with the specified UUID.
Gets the UUID, name, attribute list and more information for one deployable with the specified UUID.
Normal response codes: 200
+2 -2
View File
@@ -13,7 +13,7 @@ List Devices
.. rest_method:: GET /v2/devices
Lists UUIDs, names, type and more informations for all devices.
Lists UUIDs, names, type and more information for all devices.
Normal response codes: 200
@@ -55,7 +55,7 @@ Get One Device
.. rest_method:: GET /v2/devices/{device_uuid}
Gets the UUID, name, type and more informations for one device with the specified UUID.
Gets the UUID, name, type and more information for one device with the specified UUID.
Normal response codes: 200
+1 -1
View File
@@ -183,7 +183,7 @@ deployable_num_accelerators:
description: |
Number of accelerators spawned by this deployable.
in: body
requied: true
required: true
type: integer
deployable_parent_id:
description: |
+1 -1
View File
@@ -19,7 +19,7 @@ from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
# A common internal acclerator object for internal use.
# A common internal accelerator object for internal use.
class Accelerator(Base):
__tablename__ = 'accelerators'
accelerator_id = Column(String, primary_key=True)
+1 -1
View File
@@ -40,7 +40,7 @@ class GenericDriver(object, metaclass=abc.ABCMeta):
"""Collects device stats.
It is used to collect information from the device about the device
capabilities. Such as performance info like temprature, power, volt,
capabilities. Such as performance info like temperature, power, volt,
packet_count info.
:return: The stats info of the device. The format should follow the
@@ -98,7 +98,7 @@ def _generate_dep_list(gpu):
driver_dep.attribute_list = _generate_attribute_list(gpu)
driver_dep.attach_handle_list = []
# NOTE(wangzhh): The name of deployable should be unique, its format is
# under disscussion, may looks like
# under discussion, may looks like
# <ComputeNodeName>_<NumaNodeName>_<CyborgName>_<NumInHost>
# NOTE(yumeng) Since Wallaby release, the deplpyable_name is named as
# <Compute_hostname>_<Device_address>
@@ -178,7 +178,7 @@ def _get_supported_vgpu_types():
for vgpu_type in CONF.gpu_devices.enabled_vgpu_types:
group = getattr(CONF, 'vgpu_%s' % vgpu_type, None)
if group is None or not group.device_addresses:
# Device addresses must be configured explictly now for every
# Device addresses must be configured explicitly now for every
# enabled vgpu type. Will improve after the disable and enable
# devices interfaces implemented.
raise exception.InvalidvGPUConfig(
@@ -93,7 +93,7 @@ def _generate_dep_list(pci):
driver_dep.attribute_list = _generate_attribute_list(pci)
driver_dep.attach_handle_list = []
# NOTE(wangzhh): The name of deployable should be unique, its format is
# under disscussion, may looks like
# under discussion, may looks like
# <ComputeNodeName>_<NumaNodeName>_<CyborgName>_<NumInHost>
# NOTE(yumeng) Since Wallaby release, the deplpyable_name is named as
# <Compute_hostname>_<Device_address>
+2 -2
View File
@@ -87,7 +87,7 @@ class NVMFDRIVER(SPDKDRIVER):
"""Delete a nvmf subsystem
:param nqn: Target nqn(ASCII).
:raise exception: Invaid
:raise exception: Invalid
"""
if nqn == "":
acc_client = NvmfTgt(self.py)
@@ -115,7 +115,7 @@ class NVMFDRIVER(SPDKDRIVER):
:param hosts: Whitespace-separated list of host nqn list.
:param serial_number: Example: 'SPDK00000000000001.
:param namespaces: Whitespace-separated list of namespaces.
:raise exception: Invaid
:raise exception: Invalid
"""
if ((namespaces != '' and listen != '') and
(hosts != '' and serial_number != '')) and nqn != '':
+2 -2
View File
@@ -112,7 +112,7 @@ def authorize_wsgi(api_name, act=None, need_target=True):
def post(self, values):
...
"""
def wraper(fn):
def wrapper(fn):
action = '%s:%s' % (api_name, act or fn.__name__)
# In this authorize method, we return a dict data when authorization
@@ -171,4 +171,4 @@ def authorize_wsgi(api_name, act=None, need_target=True):
return handle
return wraper
return wrapper
+1 -1
View File
@@ -49,7 +49,7 @@ ARQ_BIND_STATES_STATUS_MAP = {
# TODO(Shaohe): maybe we can use oslo automaton lib
# ref: https://docs.openstack.org/automaton/latest/user/examples.html
# The states in value list can transfrom to the key state
# The states in value list can transform to the key state
ARQ_STATES_TRANSFORM_MATRIX = {
ARQ_INITIAL: [],
ARQ_BIND_STARTED: [ARQ_INITIAL, ARQ_UNBOUND],
+1 -1
View File
@@ -44,7 +44,7 @@ class NovaAPI(object):
# NOTE(Sundar): Response status should always be 200/207. See
# https://review.opendev.org/#/c/698037/
if response.status_code == 200:
LOG.info("Sucessfully sent events to Nova, events: %(events)s",
LOG.info("Successfully sent events to Nova, events: %(events)s",
{"events": events})
elif response.status_code == 207:
# NOTE(Sundar): If Nova returns per-event code of 422, that
+5 -5
View File
@@ -248,12 +248,12 @@ class ThreadWorks(Singleton):
"kwargs: %s", func, args, kwargs)
# NOTE(Shaohe) shutdown should be after job submit
executor.shutdown(wait=False)
# TODO(Shaohe) we need to consider resouce collection such as the
# follow code to recoder them with timestemp?
# TODO(Shaohe) we need to consider resource collection such as the
# follow code to recoder them with timestamp?
# master = {tag: {
# "executor": executor,
# "job": f,
# "timestemp": time.time(),
# "timestamp": time.time(),
# "timeout": timeout}}
# self.masters.update(master)
return job
@@ -334,7 +334,7 @@ class ThreadWorks(Singleton):
# info https://www.oreilly.com/library/view/python-cookbook/
# 0596001673/ch14s05.html
def format_tb(tb, limit=None):
"""Fromat traceback to a string list.
"""Format traceback to a string list.
Print the usual traceback information, followed by a listing of all the
local variables in each frame.
@@ -351,7 +351,7 @@ def format_tb(tb, limit=None):
def wrap_job_tb(msg="Reason: %s"):
"""Wrap a function with a is_job tag added, and catch Excetpion."""
"""Wrap a function with a is_job tag added, and catch Exception."""
def _wrap_job_tb(method):
@wraps(method)
def _impl(self, *args, **kwargs):
+3 -3
View File
@@ -112,7 +112,7 @@ class ConductorManager(object):
:param driver_device_list: a list of driver_device object
discovered by agent in the host.
"""
# TODO(): Everytime get from the DB?
# TODO(): Every time get from the DB?
# First retrieve the old_device_list from the DB.
old_driver_device_list = DriverDevice.list(context, hostname)
# TODO(wangzhh): Remove invalid driver_devices without controlpath_id.
@@ -185,7 +185,7 @@ class ConductorManager(object):
old_driver_dev_obj = old_driver_device_list[old_cpid_list.index(s)]
# First, get dev_obj_list from hostname
device_obj_list = Device.get_list_by_hostname(context, host)
# Then, use controlpath_id.cpid_info to identiy one Device.
# Then, use controlpath_id.cpid_info to identify one Device.
cpid_info = new_driver_dev_obj.controlpath_id.cpid_info
for dev_obj in device_obj_list:
# get cpid_obj, could be empty or only one value.
@@ -424,7 +424,7 @@ class ConductorManager(object):
for rp in rp_in_tree[::-1]:
if rp["parent_provider_uuid"] == rp_uuid or rp["uuid"] == rp_uuid:
self.placement_client.delete_provider(rp["uuid"])
LOG.info("Sucessfully delete resource provider %(rp_uuid)s",
LOG.info("Successfully delete resource provider %(rp_uuid)s",
{"rp_uuid": rp["uuid"]})
if rp["uuid"] == rp_uuid:
break
+1 -1
View File
@@ -49,7 +49,7 @@ class ConductorAPI(object):
def report_data(self, context, hostname, driver_device_list):
"""Signal to conductor service to update the cyborg DB
:parma context: request context.
:param context: request context.
"""
cctxt = self.client.prepare(topic=self.topic)
cctxt.call(context, 'report_data', hostname=hostname,
+1 -1
View File
@@ -55,7 +55,7 @@ multiple vGPU types.
If more than one single vGPU type are provided, then for each
*vGPU type*, you must add an additional section ``[vgpu_$(VGPU_TYPE)]`` with
a single configuration option ``device_addresses`` to assign this type to
the target physical GPU(s). PGPUs should be configured explictly now, we will
the target physical GPU(s). PGPUs should be configured explicitly now, we will
improve this after we implement the enable/disable interface.
If the same PCI address is provided for two different types, cyborg-agent will
+2 -2
View File
@@ -794,7 +794,7 @@ class Connection(api.Connection):
return query_prefix.all()
# def _exact_attribute_by_filter(self, query, filters):
# """Applies exact match filtering to a atrtribute query.
# """Applies exact match filtering to a attribute query.
# Returns the updated query.
# :param filters: The filters specified by a dict of kv pairs
# """
@@ -1064,7 +1064,7 @@ class Connection(api.Connection):
return reservations
def _sync_acc_res(self, context, resource, project_id):
"""Quota sync funciton"""
"""Quota sync function"""
res_in_use = self._device_data_get_for_project(context, resource,
project_id)
return {resource: res_in_use}
@@ -96,7 +96,7 @@ class DriverDeployable(base.DriverObjectBase,
for dep_obj in dep_obj_list:
# get driver_ah_obj_list for this dep_obj
driver_ah_obj_list = DriverAttachHandle.list(context, dep_obj.id)
# get driver_attr_obj_list fro this dep_obj
# get driver_attr_obj_list for this dep_obj
driver_attr_obj_list = DriverAttribute.list(context, dep_obj.id)
driver_dep_obj = cls(context=context,
name=dep_obj.name,
@@ -112,7 +112,7 @@ class DriverDeployable(base.DriverObjectBase,
# get deployable_obj_list for one device_id
dep_obj = Deployable.get_by_name(context, name)
driver_ah_obj_list = DriverAttachHandle.list(context, dep_obj.id)
# get driver_attr_obj_list fro this dep_obj
# get driver_attr_obj_list for this dep_obj
driver_attr_obj_list = DriverAttribute.list(context, dep_obj.id)
driver_dep_obj = cls(context=context, name=dep_obj.name,
num_accelerators=dep_obj.num_accelerators,
@@ -102,7 +102,7 @@ class DriverDevice(base.DriverObjectBase,
"""
# get dev_obj_list from hostname
device_obj_list = Device.get_list_by_hostname(context, host)
# use controlpath_id.cpid_info to identiy one Device.
# use controlpath_id.cpid_info to identify one Device.
for device_obj in device_obj_list:
# get cpid_obj, could be empty or only one value.
cpid_obj = ControlpathID.get_by_device_id_cpidinfo(
@@ -147,7 +147,7 @@ class DriverDevice(base.DriverObjectBase,
"""
# get dev_obj_list from hostname
device_obj = Device.get_by_device_id(context, device_id)
# use controlpath_id.cpid_info to identiy one Device.
# use controlpath_id.cpid_info to identify one Device.
# get cpid_obj, could be empty or only one value.
ControlpathID.get_by_device_id_cpidinfo(
context, device_obj.id, self.controlpath_id.cpid_info)
+1 -1
View File
@@ -121,7 +121,7 @@ class BaseApiTest(base.DbTestCase):
"""Generate a header for a simulated HTTP request to Pecan test app.
:param context: context that store the client user information.
:param kw: key word aguments, used to overwrite the context attribute.
:param kw: key word arguments, used to overwrite the context attribute.
note: "is_public_api" is not in headers, it should be in environ
variables to send along with the request. We can pass it by
+1 -1
View File
@@ -46,7 +46,7 @@ class NovaAPITest(base.TestCase):
nova = nova_client.NovaAPI()
nova._send_events(self.events)
msg = 'Sucessfully sent events to Nova, events: %(events)s'
msg = 'Successfully sent events to Nova, events: %(events)s'
self.mock_log_info.assert_called_once_with(
msg, {'events': self.events})
+1 -1
View File
@@ -149,6 +149,6 @@ class TestDeviceObject(base.DbTestCase):
for t in ["GPU", "FPGA", "AICHIP"]:
device = objects.Device(self.context, type=t)
self.assertEqual(self.context, device._context)
# Invaild type will raise ValueError
# Invalid type will raise ValueError
self.assertRaises(ValueError, objects.Device,
self.context, type='OTHER_TYPE')
+1 -1
View File
@@ -191,7 +191,7 @@ function configure_cyborg_conductor {
# NOTE(sean-k-mooney) it is not obvious why this is in the conductor
# section or what sets is_deployed_by_agent so this should either be
# documented, removed or moved to the correct locaiton.
# documented, removed or moved to the correct location.
if is_deployed_by_agent; then
iniset $CYBORG_CONF_FILE api ramdisk_heartbeat_timeout 30
fi
+1
View File
@@ -0,0 +1 @@
aaS
+1 -1
View File
@@ -203,7 +203,7 @@ as at project-level operations. Cyborg policies are defaulted to below rules:
With these new defaults, you can solve the problem of:
#. Providing the read-only access to the user. Polices are made more granular
and defaulted to reader rules. For exmaple: If you need to let someone audit
and defaulted to reader rules. For example: If you need to let someone audit
your deployment for security purposes.
#. Customize the policy in better way. For example, you will be able
+1 -1
View File
@@ -27,7 +27,7 @@ permissions on REST API actions.
.. # NOTE(mriedem): This is the section where we hide things that we don't
# actually want in the table of contents but sphinx build would fail if
# they aren't in the toctree somewhere.
.. # NOTE(amotoki): toctree needs to be placed at the end of the secion to
.. # NOTE(amotoki): toctree needs to be placed at the end of the section to
# keep the document structure in the PDF doc.
.. toctree::
:hidden:
+2 -2
View File
@@ -46,7 +46,7 @@ Task Tracking
We track our tasks in the `Launchpad <https://bugs.launchpad.net/openstack-cyborg>`_.
We also have our planed goals and schedule for each OpenStack official release.
We also have our planned goals and schedule for each OpenStack official release.
If you are a new contributor who are looking for tasks, please take a look.
we have tasks from low-hanging-fruit to middle, and advanced levels.
`Development_Release_Schedule
@@ -74,7 +74,7 @@ To merge a patch, it must pass all voting Zuul checks and get two +2s from
core reviewers. We strive to avoid scenarios where one person from a company
or organization proposes a patch, and two other core reviewers from the
same organization approve it to get it merged. In other words, at least
one among the patch author and the two approving reviwers must be from
one among the patch author and the two approving reviewers must be from
another organization.
We are constantly striving to improve quality. Proposed patches must
+1 -1
View File
@@ -142,7 +142,7 @@ Testing with unmerged changes
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
To test with changes that have not been merged, the enable_plugin
line can be modifed to specify the branch/reference to be cloned.
line can be modified to specify the branch/reference to be cloned.
::
+1 -1
View File
@@ -32,7 +32,7 @@ Reviewing
* :doc:`/contributor/release-guide`: Chronological guide for release liaisons
.. # NOTE: toctree needs to be placed at the end of the secion to
.. # NOTE: toctree needs to be placed at the end of the section to
# keep the document structure in the PDF doc.
.. toctree::
:hidden:
+2 -2
View File
@@ -48,7 +48,7 @@ Once you are running cyborg, the following information is extremely useful.
* :doc:`Admin Guide </admin/index>`: A collection of guides for administrating
cyborg.
.. # NOTE(amotoki): toctree needs to be placed at the end of the secion to
.. # NOTE(amotoki): toctree needs to be placed at the end of the section to
# keep the document structure in the PDF doc.
.. toctree::
:hidden:
@@ -84,7 +84,7 @@ following endpoints:
/v2.0 - same API as v2, except uses microversions
The follwoing guide concentrates on documenting the v2 API, please note that
The following guide concentrates on documenting the v2 API, please note that
the v2.0 is the first microversion of the v2 API and are also covered by this
guide.
@@ -1,5 +1,5 @@
---
features:
- |
Add ``ARQ_UNBIND_FAILED`` status for Accelerator Requests (arq) unbind process. Nowdays the status is
Add ``ARQ_UNBIND_FAILED`` status for Accelerator Requests (arq) unbind process. Nowadays the status is
needed to accurate record the arq status.
@@ -2,7 +2,7 @@
features:
- |
`Bug 1928174`_ is cleaned the old device trait on reporting data. the
trait will be removing succesfully if no rp uses, otherwise placement will
trait will be removing successfully if no rp uses, otherwise placement will
raise 409 exception.
.. _Bug 1928174: https://bugs.launchpad.net/openstack-cyborg/+bug/1928174
@@ -2,5 +2,5 @@
features:
- |
The cyborg generic driver provide a full implementation of CRUD operations,
for testing purpose only. This is only an examplary implementation of a driver
for testing purpose only. This is only an exemplary implementation of a driver
which specific accelerator driver could refer to.
@@ -4,4 +4,4 @@ features:
The Inspur NVMe SSD driver provides the discover and report proposal of
Inspur NVMe SSD disks, then we can use these disks binding and unbinding
with VM like PGPU to accelerator the io rate for the VM. The Inspur NVMe
SSD doesnot support virtualization, one disk can be only bind to one VM.
SSD does not support virtualization, one disk can be only bind to one VM.
@@ -7,4 +7,4 @@ features:
Device Personalization) which provides the ability to reconfigure the
packet processing pipeline to support a broader range of traffic types.
It also supports SR-IOV technology, each physical card can be virtualized
into mulitiple VFs.
into multiple VFs.
@@ -3,6 +3,6 @@ features:
- |
The cyborg-intel-qat-driver-proposal spec defines the Intel QAT accelerator
driver managed by Cyborg. Intel QAT card is an accelerator that can
accelerate encrytion and compression/decompression operation in data center.
accelerate encryption and compression/decompression operation in data center.
It also support SR-IOV technology, each physical card can be virtualized
into mulitiple VFs.
into multiple VFs.
@@ -29,7 +29,7 @@ features:
- New Defaults Configuration
Policies are default to Admin, Member and Reader roles. Old roles
are also supproted. You can switch to new defaults via config option
are also supported. You can switch to new defaults via config option
``[oslo_policy]enforce_new_defaults`` in ``cyborg.conf`` file.
- New Base policy roles
@@ -2,6 +2,6 @@
features:
- |
Complete VGPU management feature. VGPU driver is nvidia_gpu_driver same as
PGPU driver. The GPU devices configration is same as Nova side, the
PGPU driver. The GPU devices configuration is same as Nova side, the
difference is we delete mdev when the vm is destroy and assign VGPU trait
to create vm.