Merge "Fix typos"
This commit is contained in:
commit
b9c1167fac
.stestr.conf.zuul.yaml
api-ref/source
doc/source
placement
@ -2,7 +2,7 @@
|
|||||||
test_path=./placement/tests/unit
|
test_path=./placement/tests/unit
|
||||||
top_dir=./
|
top_dir=./
|
||||||
# The group_regex describes how stestr will group tests into the same process
|
# 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
|
# 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
|
# 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.
|
# tests which do not match this regex will not be grouped in any special way.
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
jobs:
|
jobs:
|
||||||
# update the python version when the support runtime for testing changes.
|
# 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
|
# 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.
|
# of frequent patches.
|
||||||
- openstack-tox-functional-py39
|
- openstack-tox-functional-py39
|
||||||
- openstack-tox-py39
|
- openstack-tox-py39
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Allocation candidates
|
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
|
List allocation candidates
|
||||||
==========================
|
==========================
|
||||||
|
@ -103,7 +103,7 @@ Deletes all inventory records for the resource provider identified by `{uuid}`.
|
|||||||
|
|
||||||
**Troubleshooting**
|
**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
|
the provider or if the provider's inventory is updated by another
|
||||||
thread while attempting the operation.
|
thread while attempting the operation.
|
||||||
|
|
||||||
|
@ -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
|
identified by `name`. One resource class can be listed, updated and
|
||||||
deleted.
|
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
|
Show resource class
|
||||||
===================
|
===================
|
||||||
|
@ -6,7 +6,7 @@ See `Traits`_ for a description.
|
|||||||
This group of API requests queries/edits the association between
|
This group of API requests queries/edits the association between
|
||||||
traits and resource providers.
|
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
|
List resource provider traits
|
||||||
=============================
|
=============================
|
||||||
|
@ -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
|
spinning disk (qualitative). Traits provide a way to mark that a
|
||||||
storage provider is SSD or spinning.
|
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
|
List traits
|
||||||
===========
|
===========
|
||||||
|
@ -152,7 +152,7 @@ provided in a request using another decorator:
|
|||||||
``@util.check_accept('application/json')``. If the header does not allow
|
``@util.check_accept('application/json')``. If the header does not allow
|
||||||
`JSON`, a ``406`` response status is returned.
|
`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
|
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
|
are directly associated with an object (or objects, in the case of a
|
||||||
collection response) that has an ``updated_at`` (or ``created_at``)
|
collection response) that has an ``updated_at`` (or ``created_at``)
|
||||||
|
@ -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
|
possible. Parameters which are required should be marked as such and
|
||||||
only under exceptional circumstances should additional parameters
|
only under exceptional circumstances should additional parameters
|
||||||
which are not defined in the schema be permitted (eg
|
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
|
Reuse of existing predefined parameter types such as regexps for
|
||||||
passwords and user defined names is highly encouraged.
|
passwords and user defined names is highly encouraged.
|
||||||
|
@ -54,7 +54,7 @@ class _AttributeCache(object):
|
|||||||
:param ctx: `placement.context.RequestContext` from which we can grab a
|
:param ctx: `placement.context.RequestContext` from which we can grab a
|
||||||
`SQLAlchemy.Connection` object to use for any DB lookups.
|
`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.
|
# development.
|
||||||
assert self._table is not None, "_table must be defined"
|
assert self._table is not None, "_table must be defined"
|
||||||
assert self._not_found is not None, "_not_found must be defined"
|
assert self._not_found is not None, "_not_found must be defined"
|
||||||
|
@ -175,7 +175,7 @@ def add_db_command_parsers(subparsers, config):
|
|||||||
parser.set_defaults(func=parser.print_help)
|
parser.set_defaults(func=parser.print_help)
|
||||||
db_parser = parser.add_subparsers(description='database commands')
|
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 = db_parser.add_parser('sync', help=help, description=help)
|
||||||
sync_parser.set_defaults(func=command_object.db_sync)
|
sync_parser.set_defaults(func=command_object.db_sync)
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
"""Deployment handling for Placmenent API."""
|
"""Deployment handling for Placement API."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ def update_database(conf):
|
|||||||
resource_class.ensure_sync(ctx)
|
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()
|
# resolution of https://bugs.launchpad.net/nova/+bug/1734491, loadapp()
|
||||||
# is considered a public interface for the creation of a placement
|
# is considered a public interface for the creation of a placement
|
||||||
# WSGI app so must maintain its interface. The canonical placement WSGI
|
# WSGI app so must maintain its interface. The canonical placement WSGI
|
||||||
|
@ -346,7 +346,7 @@ def _set_allocations(context, allocs):
|
|||||||
# allocations do not cause any inventory capacity to be exceeded for
|
# allocations do not cause any inventory capacity to be exceeded for
|
||||||
# any resource provider and resource class involved in the allocation
|
# any resource provider and resource class involved in the allocation
|
||||||
# transaction. _check_capacity_exceeded() raises an exception if any
|
# 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
|
# function returns a list of ResourceProvider objects containing the
|
||||||
# generation of the resource provider at the time of the check. These
|
# 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
|
# objects are used at the end of the allocation transaction as a guard
|
||||||
|
@ -55,7 +55,7 @@ class AllocationCandidates(object):
|
|||||||
providers matching a set of supplied resource constraints, with a set
|
providers matching a set of supplied resource constraints, with a set
|
||||||
of allocation requests constructed from that list of resource
|
of allocation requests constructed from that list of resource
|
||||||
providers. If CONF.placement.randomize_allocation_candidates (on
|
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.
|
allocation requests will be randomized.
|
||||||
|
|
||||||
:param context: placement.context.RequestContext object.
|
:param context: placement.context.RequestContext object.
|
||||||
|
@ -231,7 +231,7 @@ def _resource_classes_sync(ctx):
|
|||||||
res = ctx.session.execute(sel).fetchall()
|
res = ctx.session.execute(sel).fetchall()
|
||||||
db_classes = [r[0] for r in res if not orc.is_custom(r[0])]
|
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)
|
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.
|
# currently in the database, and insert them.
|
||||||
batch_args = [{'name': str(name), 'id': index}
|
batch_args = [{'name': str(name), 'id': index}
|
||||||
for index, name in enumerate(orc.STANDARDS)
|
for index, name in enumerate(orc.STANDARDS)
|
||||||
|
@ -51,7 +51,7 @@ def init(
|
|||||||
if not _ENFORCER:
|
if not _ENFORCER:
|
||||||
_enforcer = policy.Enforcer(conf)
|
_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
|
# their default check_str. During the policy-defaults-refresh work, all
|
||||||
# the policy defaults have been changed and warnings for each policy
|
# the policy defaults have been changed and warnings for each policy
|
||||||
# started filling the logs limit for various tool.
|
# started filling the logs limit for various tool.
|
||||||
|
@ -234,7 +234,7 @@ alignment with the structure of the ``GET /allocations/{consumer_uuid}``
|
|||||||
response body. Because the ``PUT`` request requires ``user_id`` and
|
response body. Because the ``PUT`` request requires ``user_id`` and
|
||||||
``project_id`` in the request body, these fields are added to the ``GET``
|
``project_id`` in the request body, these fields are added to the ``GET``
|
||||||
response. In addition, the response body for ``GET /allocation_candidates``
|
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.
|
with the new ``PUT`` format.
|
||||||
|
|
||||||
1.13 - 'POST' multiple allocations to '/allocations'
|
1.13 - 'POST' multiple allocations to '/allocations'
|
||||||
|
@ -645,7 +645,7 @@ class TestAllocationListCreateDelete(tb.PlacementDbBaseTestCase):
|
|||||||
'Exceeded retry limit of %d on allocations write', 0)
|
'Exceeded retry limit of %d on allocations write', 0)
|
||||||
|
|
||||||
# Make sure the right thing happens after a small number of failures.
|
# 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
|
# both do some side effects on _set_allocations as well as have the
|
||||||
# real behavior. Two generation conflicts and then a success.
|
# real behavior. Two generation conflicts and then a success.
|
||||||
mock_log.reset_mock()
|
mock_log.reset_mock()
|
||||||
|
@ -1691,7 +1691,7 @@ class AllocationCandidatesTestCase(tb.PlacementDbBaseTestCase):
|
|||||||
tb.add_inventory(cn, orc.MEMORY_MB, 1024,
|
tb.add_inventory(cn, orc.MEMORY_MB, 1024,
|
||||||
min_unit=64, allocation_ratio=1.5)
|
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)
|
ss = self._create_provider('shared storage', uuids.agg)
|
||||||
|
|
||||||
# Give the shared storage pool some inventory of DISK_GB
|
# Give the shared storage pool some inventory of DISK_GB
|
||||||
|
@ -169,7 +169,7 @@ class CreateIncompleteConsumersTestCase(
|
|||||||
self.assertEqual((1, 1), res)
|
self.assertEqual((1, 1), res)
|
||||||
|
|
||||||
# Confirm there are still 2 incomplete allocations after one
|
# 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)
|
res = _get_allocs_with_no_consumer_relationship(self.ctx)
|
||||||
self.assertEqual(2, len(res))
|
self.assertEqual(2, len(res))
|
||||||
|
|
||||||
|
@ -573,7 +573,7 @@ class ResourceProviderTestCase(tb.PlacementDbBaseTestCase):
|
|||||||
trl = trait_obj.get_all_by_resource_provider(self.ctx, rp)
|
trl = trait_obj.get_all_by_resource_provider(self.ctx, rp)
|
||||||
self.assertEqual(1, len(trl))
|
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()
|
rp.destroy()
|
||||||
|
|
||||||
# Assert the record has been deleted
|
# Assert the record has been deleted
|
||||||
|
@ -419,7 +419,7 @@ tests:
|
|||||||
status: 200
|
status: 200
|
||||||
response_json_paths:
|
response_json_paths:
|
||||||
# CUSTOM_NET_MBPS of 2000 + 3000 = 5000 is too much for cn_left, but
|
# 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.`len`: 1
|
||||||
$.allocation_requests..allocations["$ENVIRON['CN_RIGHT']"].resources[VCPU]: 2
|
$.allocation_requests..allocations["$ENVIRON['CN_RIGHT']"].resources[VCPU]: 2
|
||||||
$.allocation_requests..allocations["$ENVIRON['CN_RIGHT']"].resources[MEMORY_MB]: 2048
|
$.allocation_requests..allocations["$ENVIRON['CN_RIGHT']"].resources[MEMORY_MB]: 2048
|
||||||
|
@ -71,7 +71,7 @@ tests:
|
|||||||
# not INSTANCE_ID, when we try to allocate here, we don't have room. This
|
# 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
|
# 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
|
# 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
|
- name: with allocations
|
||||||
POST: /reshaper
|
POST: /reshaper
|
||||||
data:
|
data:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Create a shared resource provider that shares a custom resource
|
# 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.
|
# requesting resources.
|
||||||
#
|
#
|
||||||
# NOTE(cdent): raw uuids are used here instead of environment variables as
|
# NOTE(cdent): raw uuids are used here instead of environment variables as
|
||||||
@ -133,7 +133,7 @@ tests:
|
|||||||
$.resource_providers.`len`: 0
|
$.resource_providers.`len`: 0
|
||||||
|
|
||||||
# this is one allocation request and two resource providers because
|
# 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
|
# can either fully the resources query or can do so with the
|
||||||
# assistance of a sharing provider.
|
# assistance of a sharing provider.
|
||||||
- name: get allocation candidates shared
|
- name: get allocation candidates shared
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# 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 keystonemiddleware import auth_token
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
Loading…
x
Reference in New Issue
Block a user