As noted inline, the 'policies' field may be a list but it expects one
of two items.
Change-Id: I34c68df1e6330dab1524aa0abec733610211a407
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #1894966
This microversion implements below API cleanups:
1. 400 for unknown param for query param and for request body.
2. Making server representation always consistent among all APIs
returning the complete server representation.
3. Change the default return value of ``swap`` field from the empty string
to 0 (integer) in flavor APIs.
4. Return ``servers`` field always in the response of GET
hypervisors API even there are no servers on hypervisor
Details: https://specs.openstack.org/openstack/nova-specs/specs/train/approved/api-consistency-cleanup.html
Partial-Implements: blueprint api-consistency-cleanup
Change-Id: I9d257a003d315b84b937dcef91f3cb41f3e24b53
Enable users to define the policy rules on server group policy
to meet more advanced policy requirement. This microversion
brings the following changes in server group APIs:
* Add ``policy`` and ``rules`` fields in the request of POST
``/os-server-groups``.
* The ``policy`` and ``rules`` fields will be
returned in response body of POST, GET ``/os-server-groups``
API and GET ``/os-server-groups/{server_group_id}`` API.
* The ``policies`` and ``metadata`` fields have been removed
from the response body of POST, GET ``/os-server-groups`` API
and GET ``/os-server-groups/{server_group_id}`` API.
Part of blueprint: complex-anti-affinity-policies
Change-Id: I6911e97bd7f8df92511e90518dba21c127e106a5
Add additional schema check for server groups query function,
as we need backward compatible those changes, here we don't do real
check and later a microversion need to be done to do the real check.
Part of blueprint json-schema-validation-for-query-param
Change-Id: I625af5a8fe09a9772079e893aa707b961c666d2a
Many attribute in the request schema are defined with
allowed enum values. But schema does not specify those
enum as string type.
enum in json schema is defined in such a way that it
allows any type not just string so defining each enum type
as string explicitly makes schema more readable and consistent
with other API schema.
Note- this does not change any behavior or does not fix any issue.
This is just for consistency with other schema definition and readability.
Change-Id: I4f6fe5e418c624e0dcbcfb3b6bca64ab3e5c96fe
The 'policies' parameter for the os-server-groups API is an array
for legacy reasons, but the schema validation allows only a single
item and it's from the enumerated list, and exactly one must be
specified when creating a server group.
This patch cleans up the policies parameter description to avoid
confusion over the number of items that can be specified or their
form, and it also provides a description of each available policy.
Since the jsonschema for policies is a bit confusing too, this
patch adds a comment in the schema code to avoid future confusion
over how the validation works.
Change-Id: I3ab2880ed6e8bb2cdf476c197719b83d768d44d0
Closes-Bug: #1652943
Allows soft-affinity and soft-anti-affinity to be used as a policy
for the server group api extension. Add soft policies
to the JSONSchema, which validates server group definitions.
Bump API microversion to 2.15.
Implements: blueprint soft-affinity-for-server-group
Change-Id: I376bdba7df1344d269aa126f4896610baf2e16a2
This is step 4 of the remove v3 process. It moves the v2.1
json-schemas out of v3 directory, and also corrects all the
references.
Change-Id: Ibf88c38df951ed755b7431846cca7496f861c1dd
Partial-Bug: #1462901