Merge "Fix nits in support traits changes"

This commit is contained in:
Zuul 2018-02-01 21:25:45 +00:00 committed by Gerrit Code Review
commit ea96baf2a3
4 changed files with 9 additions and 8 deletions

View File

@ -196,7 +196,7 @@ def _transform_allocation_candidates(alloc_cands, want_version):
include_traits = want_version.matches((1, 17))
p_sums = _transform_provider_summaries(alloc_cands.provider_summaries,
include_traits)
include_traits=include_traits)
return {
'allocation_requests': a_reqs,
'provider_summaries': p_sums,

View File

@ -306,9 +306,9 @@ def normalize_traits_qs_param(val):
"""
ret = set(substr.strip() for substr in val.split(','))
if not all(trait for trait in ret):
msg = _('Invalid query string parameters: Expected \'required\' '
'parameter value of the form: HW_CPU_X86_VMX,CUSTOM_MAGIC. '
'Got: "%s"') % val
msg = _("Invalid query string parameters: Expected 'required' "
"parameter value of the form: HW_CPU_X86_VMX,CUSTOM_MAGIC. "
"Got: %s") % val
raise webob.exc.HTTPBadRequest(msg)
return ret

View File

@ -56,7 +56,7 @@ allocation_candidates_required:
required: false
min_version: 1.17
description: >
Accepts a list of traits separated by `,`. Allocation requests in the
Accepts a list of comma-separated traits. Allocation requests in the
response will be for resource providers that have capacity for all
requested resources and the set of those resource providers will
*collectively* contain all of the required traits.
@ -252,7 +252,8 @@ provider_summaries:
description: >
A dictionary keyed by resource provider UUID,
of dictionaries of inventory/capacity information. The list of traits
the resource provider has associated with it is included in version `1.17`.
the resource provider has associated with it is included in version `1.17`
and above.
reserved: &reserved
type: integer
in: body

View File

@ -6,5 +6,5 @@ features:
separated by ``,``, which is used to further limit the list of allocation
requests to resource providers that have the capacity to fulfill the
requested resources AND *collectively* have all of the required traits
associated with them. In the same microversion, the candidate attached
traits returned in the provider summary.
associated with them. In the same microversion, the provider summary
includes the traits associated with each provider.