Fix perfload jobs after consumer_types
Since consumer_types was added to the API in I24c2315093e07dbf25c4fb53152e6a4de7477a51 the two perfload jobs are getting errors from placement as they are using the latest microversion but does not specify the consumer_type when creating allocations. The server could not comply with the request since it is either malformed or otherwise incorrect.\n\n JSON does not validate: 'consumer_type' is a required property This patch changes the allocation request to specify TEST as consumer type. Change-Id: I31500e3e6df5717d6bdb6ed7ed43325653d49be5
This commit is contained in:
parent
7e0ad4956f
commit
a57215e8b6
@ -54,7 +54,7 @@ function ab_bench {
|
|||||||
function write_allocation {
|
function write_allocation {
|
||||||
# Take the first allocation request and send it back as a well-formed allocation
|
# Take the first allocation request and send it back as a well-formed allocation
|
||||||
curl -s -H 'x-auth-token: admin' -H 'openstack-api-version: placement latest' "${PLACEMENT_URL}/allocation_candidates?${PLACEMENT_QUERY}&limit=5" \
|
curl -s -H 'x-auth-token: admin' -H 'openstack-api-version: placement latest' "${PLACEMENT_URL}/allocation_candidates?${PLACEMENT_QUERY}&limit=5" \
|
||||||
| jq --arg proj $(uuidgen) --arg user $(uuidgen) '.allocation_requests[0] + {consumer_generation: null, project_id: $proj, user_id: $user}' \
|
| jq --arg proj $(uuidgen) --arg user $(uuidgen) '.allocation_requests[0] + {consumer_generation: null, project_id: $proj, user_id: $user, consumer_type: "TEST"}' \
|
||||||
| curl -s -H 'x-auth-token: admin' -H 'content-type: application/json' -H 'openstack-api-version: placement latest' \
|
| curl -s -H 'x-auth-token: admin' -H 'content-type: application/json' -H 'openstack-api-version: placement latest' \
|
||||||
-X PUT -d @- "${PLACEMENT_URL}/allocations/$(uuidgen)"
|
-X PUT -d @- "${PLACEMENT_URL}/allocations/$(uuidgen)"
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ function ab_bench {
|
|||||||
function write_allocation {
|
function write_allocation {
|
||||||
# Take the first allocation request and send it back as a well-formed allocation
|
# Take the first allocation request and send it back as a well-formed allocation
|
||||||
curl -s -H 'x-auth-token: admin' -H 'openstack-api-version: placement latest' "${PLACEMENT_URL}/allocation_candidates?${PLACEMENT_QUERY}&limit=5" \
|
curl -s -H 'x-auth-token: admin' -H 'openstack-api-version: placement latest' "${PLACEMENT_URL}/allocation_candidates?${PLACEMENT_QUERY}&limit=5" \
|
||||||
| jq --arg proj $(uuidgen) --arg user $(uuidgen) '.allocation_requests[0] + {consumer_generation: null, project_id: $proj, user_id: $user}' \
|
| jq --arg proj $(uuidgen) --arg user $(uuidgen) '.allocation_requests[0] + {consumer_generation: null, project_id: $proj, user_id: $user, consumer_type: "TEST"}' \
|
||||||
| curl -s -H 'x-auth-token: admin' -H 'content-type: application/json' -H 'openstack-api-version: placement latest' \
|
| curl -s -H 'x-auth-token: admin' -H 'content-type: application/json' -H 'openstack-api-version: placement latest' \
|
||||||
-X PUT -d @- "${PLACEMENT_URL}/allocations/$(uuidgen)"
|
-X PUT -d @- "${PLACEMENT_URL}/allocations/$(uuidgen)"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user