diff --git a/.stestr.conf b/.stestr.conf index a06f02ba8..4d6f6ca56 100644 --- a/.stestr.conf +++ b/.stestr.conf @@ -2,7 +2,7 @@ test_path=./placement/tests/unit top_dir=./ # The group_regex describes how stestr will group tests into the same process -# when running concurently. The following ensures that gabbi tests coming from +# when running concurrently. The following ensures that gabbi tests coming from # the same YAML file are all in the same process. This is important because # each YAML file represents an ordered sequence of HTTP requests. Note that # tests which do not match this regex will not be grouped in any special way. diff --git a/.zuul.yaml b/.zuul.yaml index 42e965e91..4a71e6ba8 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -60,7 +60,7 @@ jobs: # update the python version when the support runtime for testing changes. # we only test the latest version in the periodics as its just a signal - # that we need to investigate the healt of the master branch in the absence + # that we need to investigate the health of the master branch in the absence # of frequent patches. - openstack-tox-functional-py39 - openstack-tox-py39 diff --git a/api-ref/source/allocation_candidates.inc b/api-ref/source/allocation_candidates.inc index 648174455..4814f422e 100644 --- a/api-ref/source/allocation_candidates.inc +++ b/api-ref/source/allocation_candidates.inc @@ -2,7 +2,7 @@ Allocation candidates ===================== -.. note:: Allocation candidates API requests are availiable starting from version 1.10. +.. note:: Allocation candidates API requests are available starting from version 1.10. List allocation candidates ========================== diff --git a/api-ref/source/inventories.inc b/api-ref/source/inventories.inc index 468fcc74a..f6d863d1e 100644 --- a/api-ref/source/inventories.inc +++ b/api-ref/source/inventories.inc @@ -103,7 +103,7 @@ Deletes all inventory records for the resource provider identified by `{uuid}`. **Troubleshooting** -The request returns an HTTP 409 when there are alllocations against +The request returns an HTTP 409 when there are allocations against the provider or if the provider's inventory is updated by another thread while attempting the operation. diff --git a/api-ref/source/resource_class.inc b/api-ref/source/resource_class.inc index 47c42ffc9..a8d532ce4 100644 --- a/api-ref/source/resource_class.inc +++ b/api-ref/source/resource_class.inc @@ -7,7 +7,7 @@ This group of API calls works with a single resource class identified by `name`. One resource class can be listed, updated and deleted. -.. note:: Resource class API calls are availiable starting from version 1.2. +.. note:: Resource class API calls are available starting from version 1.2. Show resource class =================== diff --git a/api-ref/source/resource_provider_traits.inc b/api-ref/source/resource_provider_traits.inc index 49d9f9521..c3ddd3c2f 100644 --- a/api-ref/source/resource_provider_traits.inc +++ b/api-ref/source/resource_provider_traits.inc @@ -6,7 +6,7 @@ See `Traits`_ for a description. This group of API requests queries/edits the association between traits and resource providers. -.. note:: Traits API requests are availiable starting from version 1.6. +.. note:: Traits API requests are available starting from version 1.6. List resource provider traits ============================= diff --git a/api-ref/source/traits.inc b/api-ref/source/traits.inc index f7111360e..71b224443 100644 --- a/api-ref/source/traits.inc +++ b/api-ref/source/traits.inc @@ -9,7 +9,7 @@ providers: a user may request 80GiB of disk space for an instance spinning disk (qualitative). Traits provide a way to mark that a storage provider is SSD or spinning. -.. note:: Traits API requests are availiable starting from version 1.6. +.. note:: Traits API requests are available starting from version 1.6. List traits =========== diff --git a/doc/source/contributor/architecture.rst b/doc/source/contributor/architecture.rst index b436bf979..a91744874 100644 --- a/doc/source/contributor/architecture.rst +++ b/doc/source/contributor/architecture.rst @@ -152,7 +152,7 @@ provided in a request using another decorator: ``@util.check_accept('application/json')``. If the header does not allow `JSON`, a ``406`` response status is returned. -If a hander returns a response body, a ``Last-Modified`` header should be +If a handler returns a response body, a ``Last-Modified`` header should be included with the response. If the entity or entities in the response body are directly associated with an object (or objects, in the case of a collection response) that has an ``updated_at`` (or ``created_at``) diff --git a/doc/source/specs/template.rst b/doc/source/specs/template.rst index edac0e2a6..f1b1557c2 100644 --- a/doc/source/specs/template.rst +++ b/doc/source/specs/template.rst @@ -169,7 +169,7 @@ Note that the schema should be defined as restrictively as possible. Parameters which are required should be marked as such and only under exceptional circumstances should additional parameters which are not defined in the schema be permitted (eg -additionaProperties should be False). +additionalProperties should be False). Reuse of existing predefined parameter types such as regexps for passwords and user defined names is highly encouraged. diff --git a/placement/attribute_cache.py b/placement/attribute_cache.py index 60545d3ed..2729ea4a2 100644 --- a/placement/attribute_cache.py +++ b/placement/attribute_cache.py @@ -47,7 +47,7 @@ class _AttributeCache(object): :param ctx: `placement.context.RequestContext` from which we can grab a `SQLAlchemy.Connection` object to use for any DB lookups. """ - # Prevent this class being created directly, relevent during + # Prevent this class being created directly, relevant during # development. assert self._table is not None, "_table must be defined" assert self._not_found is not None, "_not_found must be defined" diff --git a/placement/cmd/manage.py b/placement/cmd/manage.py index c51cb7b2f..d9b5bc8bd 100644 --- a/placement/cmd/manage.py +++ b/placement/cmd/manage.py @@ -175,7 +175,7 @@ def add_db_command_parsers(subparsers, config): parser.set_defaults(func=parser.print_help) db_parser = parser.add_subparsers(description='database commands') - help = 'Sync the datatabse to the current version.' + help = 'Sync the database to the current version.' sync_parser = db_parser.add_parser('sync', help=help, description=help) sync_parser.set_defaults(func=command_object.db_sync) diff --git a/placement/deploy.py b/placement/deploy.py index 014486c62..671f7ae7d 100644 --- a/placement/deploy.py +++ b/placement/deploy.py @@ -9,7 +9,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -"""Deployment handling for Placmenent API.""" +"""Deployment handling for Placement API.""" import os @@ -137,7 +137,7 @@ def update_database(conf): resource_class.ensure_sync(ctx) -# NOTE(cdent): Althought project_name is no longer used because of the +# NOTE(cdent): Although project_name is no longer used because of the # resolution of https://bugs.launchpad.net/nova/+bug/1734491, loadapp() # is considered a public interface for the creation of a placement # WSGI app so must maintain its interface. The canonical placement WSGI diff --git a/placement/objects/allocation.py b/placement/objects/allocation.py index 35e13383a..fe1fad783 100644 --- a/placement/objects/allocation.py +++ b/placement/objects/allocation.py @@ -346,7 +346,7 @@ def _set_allocations(context, allocs): # allocations do not cause any inventory capacity to be exceeded for # any resource provider and resource class involved in the allocation # transaction. _check_capacity_exceeded() raises an exception if any - # inventory capacity is exceeded. If capacity is not exceeeded, the + # inventory capacity is exceeded. If capacity is not exceeded, the # function returns a list of ResourceProvider objects containing the # generation of the resource provider at the time of the check. These # objects are used at the end of the allocation transaction as a guard diff --git a/placement/objects/allocation_candidate.py b/placement/objects/allocation_candidate.py index 88ba0069b..9b7401fac 100644 --- a/placement/objects/allocation_candidate.py +++ b/placement/objects/allocation_candidate.py @@ -55,7 +55,7 @@ class AllocationCandidates(object): providers matching a set of supplied resource constraints, with a set of allocation requests constructed from that list of resource providers. If CONF.placement.randomize_allocation_candidates (on - contex.config) is True (default is False) then the order of the + context.config) is True (default is False) then the order of the allocation requests will be randomized. :param context: placement.context.RequestContext object. diff --git a/placement/objects/resource_class.py b/placement/objects/resource_class.py index c1c51feba..d68e00d05 100644 --- a/placement/objects/resource_class.py +++ b/placement/objects/resource_class.py @@ -231,7 +231,7 @@ def _resource_classes_sync(ctx): res = ctx.session.execute(sel).fetchall() db_classes = [r[0] for r in res if not orc.is_custom(r[0])] LOG.debug("Found existing resource classes in db: %s", db_classes) - # Determine those resource clases which are in os_resource_classes but not + # Determine those resource classes which are in os_resource_classes but not # currently in the database, and insert them. batch_args = [{'name': str(name), 'id': index} for index, name in enumerate(orc.STANDARDS) diff --git a/placement/policy.py b/placement/policy.py index 96ca66634..be3338de7 100644 --- a/placement/policy.py +++ b/placement/policy.py @@ -51,7 +51,7 @@ def init( if not _ENFORCER: _enforcer = policy.Enforcer(conf) - # NOTE(gmann): Explictly disable the warnings for policies changing + # NOTE(gmann): Explicitly disable the warnings for policies changing # their default check_str. During the policy-defaults-refresh work, all # the policy defaults have been changed and warnings for each policy # started filling the logs limit for various tool. diff --git a/placement/rest_api_version_history.rst b/placement/rest_api_version_history.rst index 5222e7aac..813ffa60b 100644 --- a/placement/rest_api_version_history.rst +++ b/placement/rest_api_version_history.rst @@ -234,7 +234,7 @@ alignment with the structure of the ``GET /allocations/{consumer_uuid}`` response body. Because the ``PUT`` request requires ``user_id`` and ``project_id`` in the request body, these fields are added to the ``GET`` response. In addition, the response body for ``GET /allocation_candidates`` -is updated so the allocations in the ``alocation_requests`` object work +is updated so the allocations in the ``allocation_requests`` object work with the new ``PUT`` format. 1.13 - 'POST' multiple allocations to '/allocations' diff --git a/placement/tests/functional/db/test_allocation.py b/placement/tests/functional/db/test_allocation.py index 2e839e6ef..13e9b9499 100644 --- a/placement/tests/functional/db/test_allocation.py +++ b/placement/tests/functional/db/test_allocation.py @@ -645,7 +645,7 @@ class TestAllocationListCreateDelete(tb.PlacementDbBaseTestCase): 'Exceeded retry limit of %d on allocations write', 0) # Make sure the right thing happens after a small number of failures. - # There's a bit of mock magic going on here to enusre that we can + # There's a bit of mock magic going on here to ensure that we can # both do some side effects on _set_allocations as well as have the # real behavior. Two generation conflicts and then a success. mock_log.reset_mock() diff --git a/placement/tests/functional/db/test_allocation_candidates.py b/placement/tests/functional/db/test_allocation_candidates.py index 5da7ffc9a..c7735662e 100644 --- a/placement/tests/functional/db/test_allocation_candidates.py +++ b/placement/tests/functional/db/test_allocation_candidates.py @@ -1691,7 +1691,7 @@ class AllocationCandidatesTestCase(tb.PlacementDbBaseTestCase): tb.add_inventory(cn, orc.MEMORY_MB, 1024, min_unit=64, allocation_ratio=1.5) - # Create the shared storage pool, asociated with the same aggregate + # Create the shared storage pool, associated with the same aggregate ss = self._create_provider('shared storage', uuids.agg) # Give the shared storage pool some inventory of DISK_GB diff --git a/placement/tests/functional/db/test_consumer.py b/placement/tests/functional/db/test_consumer.py index 2ea2f65c6..4addd0c02 100644 --- a/placement/tests/functional/db/test_consumer.py +++ b/placement/tests/functional/db/test_consumer.py @@ -169,7 +169,7 @@ class CreateIncompleteConsumersTestCase( self.assertEqual((1, 1), res) # Confirm there are still 2 incomplete allocations after one - # interation of the migration. + # iteration of the migration. res = _get_allocs_with_no_consumer_relationship(self.ctx) self.assertEqual(2, len(res)) diff --git a/placement/tests/functional/db/test_resource_provider.py b/placement/tests/functional/db/test_resource_provider.py index fdd19f771..5cad55e24 100644 --- a/placement/tests/functional/db/test_resource_provider.py +++ b/placement/tests/functional/db/test_resource_provider.py @@ -573,7 +573,7 @@ class ResourceProviderTestCase(tb.PlacementDbBaseTestCase): trl = trait_obj.get_all_by_resource_provider(self.ctx, rp) self.assertEqual(1, len(trl)) - # Delete a resource provider that has a trait assosiation. + # Delete a resource provider that has a trait association. rp.destroy() # Assert the record has been deleted diff --git a/placement/tests/functional/gabbits/granular.yaml b/placement/tests/functional/gabbits/granular.yaml index 5d874027b..674d56978 100644 --- a/placement/tests/functional/gabbits/granular.yaml +++ b/placement/tests/functional/gabbits/granular.yaml @@ -419,7 +419,7 @@ tests: status: 200 response_json_paths: # CUSTOM_NET_MBPS of 2000 + 3000 = 5000 is too much for cn_left, but - # shr_net can accomodate it. + # shr_net can accommodate it. $.allocation_requests.`len`: 1 $.allocation_requests..allocations["$ENVIRON['CN_RIGHT']"].resources[VCPU]: 2 $.allocation_requests..allocations["$ENVIRON['CN_RIGHT']"].resources[MEMORY_MB]: 2048 diff --git a/placement/tests/functional/gabbits/reshaper.yaml b/placement/tests/functional/gabbits/reshaper.yaml index 9539287bb..28f5d237f 100644 --- a/placement/tests/functional/gabbits/reshaper.yaml +++ b/placement/tests/functional/gabbits/reshaper.yaml @@ -71,7 +71,7 @@ tests: # not INSTANCE_ID, when we try to allocate here, we don't have room. This # is a correctly invalid operation as to be actually reshaping here, we # would be needing to move the CONSUMER_ID allocations in this call (and -# setting the inventory to something that could accomodate them). +# setting the inventory to something that could accommodate them). - name: with allocations POST: /reshaper data: diff --git a/placement/tests/functional/gabbits/shared-resources.yaml b/placement/tests/functional/gabbits/shared-resources.yaml index 29c22e3d5..464589f50 100644 --- a/placement/tests/functional/gabbits/shared-resources.yaml +++ b/placement/tests/functional/gabbits/shared-resources.yaml @@ -1,5 +1,5 @@ # Create a shared resource provider that shares a custom resource -# class with a compute node and confim that it is returned when +# class with a compute node and confirm that it is returned when # requesting resources. # # NOTE(cdent): raw uuids are used here instead of environment variables as @@ -133,7 +133,7 @@ tests: $.resource_providers.`len`: 0 # this is one allocation request and two resource providers because -# at /allocation_candiates we expect those resource providers which +# at /allocation_candidates we expect those resource providers which # can either fully the resources query or can do so with the # assistance of a sharing provider. - name: get allocation candidates shared diff --git a/placement/tests/unit/test_deploy.py b/placement/tests/unit/test_deploy.py index c6ed6b5d4..c52713b55 100644 --- a/placement/tests/unit/test_deploy.py +++ b/placement/tests/unit/test_deploy.py @@ -11,7 +11,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -"""Unit tests for the deply function used to build the Placement service.""" +"""Unit tests for the deploy function used to build the Placement service.""" from keystonemiddleware import auth_token from oslo_config import cfg