The new microversion adds support for the ``in:`` syntax in the ``required`` query parameter in the ``GET /resource_providers`` API as well as to the ``required`` and ``requiredN`` query params of the ``GET /allocation_candidates`` API. Also adds support for repeating the ``required`` and ``requiredN`` parameters in the respective APIs. So required=in:T3,T4&required=T1,!T2 is supported and it means T1 and not T2 and (T3 or T4). Story: 2005345 Story: 2005346 Change-Id: I66543c0c5509739d1461af2fb2c327a003202d74
48 lines
1.7 KiB
YAML
48 lines
1.7 KiB
YAML
fixtures:
|
|
- GranularFixture
|
|
|
|
defaults:
|
|
request_headers:
|
|
x-auth-token: admin
|
|
accept: application/json
|
|
openstack-api-version: placement latest
|
|
|
|
tests:
|
|
|
|
- name: the 'in:' trait query is not supported yet
|
|
GET: /resource_providers?required=in:CUSTOM_FOO,HW_CPU_X86_MMX
|
|
request_headers:
|
|
openstack-api-version: placement 1.38
|
|
status: 400
|
|
response_strings:
|
|
- "The format 'in:HW_CPU_X86_VMX,CUSTOM_MAGIC' only supported since microversion 1.39."
|
|
|
|
- name: the second required field overwrites the first
|
|
# The fixture has one RP for each trait but no RP for both traits.
|
|
# As the second 'required' key overwrites the first in <= 1.38 we expect
|
|
# that one of that RPs will be returned.
|
|
GET: /resource_providers?required=CUSTOM_FOO&required=HW_CPU_X86_MMX
|
|
request_headers:
|
|
openstack-api-version: placement 1.38
|
|
status: 200
|
|
response_json_paths:
|
|
$.resource_providers.`len`: 1
|
|
|
|
- name: list providers with both OR, AND, and NOT trait queries
|
|
# DXVA or TLS would allow all the RPs, AVX filters that down to the left and
|
|
# the middle but FOO forbids the left so the middle remains
|
|
GET: /resource_providers?required=in:HW_GPU_API_DXVA,HW_NIC_ACCEL_TLS&required=HW_CPU_X86_AVX,!CUSTOM_FOO
|
|
status: 200
|
|
response_json_paths:
|
|
$.resource_providers.`len`: 1
|
|
$.resource_providers[0].name: cn_middle
|
|
|
|
- name: have multiple OR queries
|
|
# MMX or TLS matches middle and right, SSD or FOO matches left, right and
|
|
# shr_disk_1. So only right is a total match.
|
|
GET: /resource_providers?required=in:HW_CPU_X86_MMX,HW_NIC_ACCEL_TLS&required=in:CUSTOM_DISK_SSD,CUSTOM_FOO
|
|
status: 200
|
|
response_json_paths:
|
|
$.resource_providers.`len`: 1
|
|
$.resource_providers[0].name: cn_right
|