Fix nits in support traits changes
Addresses the comments from earlier patches: https://review.openstack.org/535642 https://review.openstack.org/536085 Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com> Change-Id: I366b97ef3c141834f48949700edb968a7c7c4167
This commit is contained in:
parent
dbd7773e05
commit
d584b00839
@ -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,
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user