From e6f234fe447ab24d947222eda52c62e2ed04768c Mon Sep 17 00:00:00 2001 From: Tetsuro Nakamura Date: Fri, 29 Mar 2019 06:35:58 +0000 Subject: [PATCH] FUP on negative-aggregate-membership series This is a follow up patch on negative-aggregate-membership series. - Remove allocation candidate related words in the `GET /resource_providers` API reference - Fix several typos in the API reference - Additionaly write in the release note that the forbidden aggregate is also supported in granular requests. Change-Id: Idb187d7ef83ad65aaaa5dbf968a15c41d73057d1 --- api-ref/source/parameters.yaml | 17 +++++++++-------- ...e-aggregate-membership-1dde3cbe27c69279.yaml | 7 +++++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index dadb2ec82..d90666dd5 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -81,7 +81,7 @@ allocation_candidates_limit: description: > A positive integer used to limit the maximum number of allocation candidates returned in the response. -member_of: &member_of +member_of: type: string in: query required: false @@ -110,8 +110,8 @@ member_of: &member_of member_of=AGGA_UUID&member_of=!AGGB_UUID - would translate logically to "Candidate resource providers must be in aggA - and *not* in AGGB. + would translate logically to "Candidate resource providers must be in AGGA + and *not* in AGGB." We do NOT support ``!`` on the values within ``in:``, but we support ``!in:``. Both of the following two example queries return candidate @@ -121,20 +121,21 @@ member_of: &member_of member_of=!AGGA_UUID&member_of=!AGGB_UUID&member_of=!AGGC_UUID We do not check if the same aggregate uuid is in both positive and negative - expression to raise 400 BadRequest. We still return 200 for such cases. + expression to return 400 BadRequest. We still return 200 for such cases. For example:: member_of=AGGA_UUID&member_of=!AGGA_UUID - would return empty ``allocation_requests`` and ``provider_summaries``, - while:: + would return an empty list for ``resource_providers``, while:: member_of=in:AGGA_UUID,AGGB_UUID&member_of=!AGGA_UUID would return resource providers that are NOT in AGGA but in AGGB. min_version: 1.3 member_of_1_21: - <<: *member_of + type: string + in: query + required: false description: > A string representing an aggregate uuid; or the prefix ``in:`` followed by a comma-separated list of strings representing aggregate uuids. The @@ -163,7 +164,7 @@ member_of_1_21: member_of=AGGA_UUID&member_of=!AGGB_UUID would translate logically to "Candidate resource providers must be in AGGA - and *not* in AGGB. + and *not* in AGGB." We do NOT support ``!`` on the values within ``in:``, but we support ``!in:``. Both of the following two example queries return candidate diff --git a/releasenotes/notes/negative-aggregate-membership-1dde3cbe27c69279.yaml b/releasenotes/notes/negative-aggregate-membership-1dde3cbe27c69279.yaml index 69e1b51b6..b3b762185 100644 --- a/releasenotes/notes/negative-aggregate-membership-1dde3cbe27c69279.yaml +++ b/releasenotes/notes/negative-aggregate-membership-1dde3cbe27c69279.yaml @@ -3,7 +3,8 @@ features: - | Add support for forbidden aggregates in ``member_of`` queryparam in ``GET /resource_providers`` and ``GET /allocation_candidates``. - Forbidden aggregates are prefixed with a ``!``. + Forbidden aggregates are prefixed with a ``!`` from microversion + ``1.32``. This negative expression can also be used in multiple ``member_of`` parameters:: @@ -27,5 +28,7 @@ features: ?member_of=!&member_of=!&member_of=! - where candidate resource providers must not be in agg1, agg2, or agg3. + where returned resource providers must not be in agg1, agg2, or agg3. + Specifying forbidden aggregates in granular requests, ``member_of`` + is also supported from the same microversion, ``1.32``.