Update api-ref and release notes for schema validation
This patch adds a reno for validate boolean parameters with spaces. Also adds valid values in api-ref for boolean parameters that user can pass in request body. Implements: bp/json-schema-validation Change-Id: Iff4b2906dba93a238d720a218fcf7a9f78b96a37
This commit is contained in:
parent
b52d26a361
commit
d98dbf4da8
@ -52,3 +52,6 @@ Block Storage API V3 (CURRENT)
|
|||||||
.. include:: quota-classes.inc
|
.. include:: quota-classes.inc
|
||||||
.. include:: quota-sets.inc
|
.. include:: quota-sets.inc
|
||||||
.. include:: worker-cleanup.inc
|
.. include:: worker-cleanup.inc
|
||||||
|
|
||||||
|
.. valid values for boolean parameters.
|
||||||
|
.. include:: valid-boolean-values.inc
|
@ -433,6 +433,7 @@ alias:
|
|||||||
allow_attached_volume:
|
allow_attached_volume:
|
||||||
description: |
|
description: |
|
||||||
Whether to allow failover if any volumes are 'in-use'.
|
Whether to allow failover if any volumes are 'in-use'.
|
||||||
|
See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -602,6 +603,7 @@ bootable:
|
|||||||
description: |
|
description: |
|
||||||
Enables or disables the bootable attribute. You
|
Enables or disables the bootable attribute. You
|
||||||
can boot an instance from a bootable volume.
|
can boot an instance from a bootable volume.
|
||||||
|
See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -609,6 +611,7 @@ bootable_1:
|
|||||||
description: |
|
description: |
|
||||||
Enables or disables the bootable attribute. You
|
Enables or disables the bootable attribute. You
|
||||||
can boot an instance from a bootable volume.
|
can boot an instance from a bootable volume.
|
||||||
|
See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -815,6 +818,7 @@ delete-volumes:
|
|||||||
description: |
|
description: |
|
||||||
If set to ``true``, allows deletion of a
|
If set to ``true``, allows deletion of a
|
||||||
group as well as all volumes in the group.
|
group as well as all volumes in the group.
|
||||||
|
See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -975,6 +979,7 @@ detached_at:
|
|||||||
disabled:
|
disabled:
|
||||||
description: |
|
description: |
|
||||||
Filter by disabled status.
|
Filter by disabled status.
|
||||||
|
See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -1072,6 +1077,7 @@ force:
|
|||||||
description: |
|
description: |
|
||||||
Indicates whether to backup, even if the volume
|
Indicates whether to backup, even if the volume
|
||||||
is attached. Default is ``false``.
|
is attached. Default is ``false``.
|
||||||
|
See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -1093,6 +1099,7 @@ force_4:
|
|||||||
description: |
|
description: |
|
||||||
Enables or disables upload of a volume that is
|
Enables or disables upload of a volume that is
|
||||||
attached to an instance. Default=False.
|
attached to an instance. Default=False.
|
||||||
|
See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -1375,7 +1382,7 @@ incremental:
|
|||||||
description: |
|
description: |
|
||||||
The backup mode. A valid value is ``true`` for
|
The backup mode. A valid value is ``true`` for
|
||||||
incremental backup mode or ``false`` for full backup mode. Default
|
incremental backup mode or ``false`` for full backup mode. Default
|
||||||
is ``false``.
|
is ``false``. See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -1402,6 +1409,7 @@ is_incremental:
|
|||||||
is_public_group_type_optional:
|
is_public_group_type_optional:
|
||||||
description: |
|
description: |
|
||||||
Whether the group type is publicly visible.
|
Whether the group type is publicly visible.
|
||||||
|
See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -1414,6 +1422,7 @@ is_public_group_type_required:
|
|||||||
is_public_volume_type_optional:
|
is_public_volume_type_optional:
|
||||||
description: |
|
description: |
|
||||||
Whether the volume type is publicly visible.
|
Whether the volume type is publicly visible.
|
||||||
|
See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -1426,6 +1435,7 @@ is_public_volume_type_required:
|
|||||||
is_up:
|
is_up:
|
||||||
description: |
|
description: |
|
||||||
Filter by up/down status.
|
Filter by up/down status.
|
||||||
|
See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -1745,7 +1755,7 @@ multiattach_req:
|
|||||||
To enable this volume to attach to more than one
|
To enable this volume to attach to more than one
|
||||||
server, set this value to ``true``. Default is ``false``.
|
server, set this value to ``true``. Default is ``false``.
|
||||||
Note that support for multiattach volumes depends on the volume
|
Note that support for multiattach volumes depends on the volume
|
||||||
type being used.
|
type being used. See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -2179,6 +2189,7 @@ properties:
|
|||||||
protected:
|
protected:
|
||||||
description: |
|
description: |
|
||||||
Whether the new image is protected. Default=False.
|
Whether the new image is protected. Default=False.
|
||||||
|
See :ref:`valid boolean values <valid-boolean-values>`
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
12
api-ref/source/v3/valid-boolean-values.inc
Normal file
12
api-ref/source/v3/valid-boolean-values.inc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
.. -*- rst -*-
|
||||||
|
|
||||||
|
.. _valid-boolean-values:
|
||||||
|
|
||||||
|
Valid boolean values
|
||||||
|
====================
|
||||||
|
|
||||||
|
Following is the list of valid values for boolean parameters.
|
||||||
|
|
||||||
|
[True, ‘True’, ‘TRUE’, ‘true’, ‘1’, ‘ON’, ‘On’, ‘on’, ‘YES’,
|
||||||
|
‘Yes’, ‘yes’, ‘y’, ‘t’, False, ‘False’, ‘FALSE’, ‘false’, ‘0’,
|
||||||
|
‘OFF’, ‘Off’, ‘off’, ‘NO’, ‘No’, ‘no’, ‘n’, ‘f’]
|
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
other:
|
||||||
|
- |
|
||||||
|
Added schema validation support using jsonschema `[json-schema-validation]`_
|
||||||
|
for all supported v3 APIs.
|
||||||
|
|
||||||
|
Following APIs were accepting boolean parameters with leading and trailing
|
||||||
|
white spaces (for e.g. " true "). But now with schema validation support,
|
||||||
|
all these boolean parameters henceforth will not accept leading and trailing
|
||||||
|
whitespaces to maintain consistency.
|
||||||
|
|
||||||
|
* Generic volume groups:
|
||||||
|
|
||||||
|
* delete group: "POST /v3/{project_id}/groups/{group_id}/action"
|
||||||
|
|
||||||
|
* failover replication: "POST /v3/{project_id}/groups/{group_id}/action"
|
||||||
|
* Volume Snapshots:
|
||||||
|
|
||||||
|
* create a snapshot: "POST /v3/{project_id}/snapshots"
|
||||||
|
* Volume_actions:
|
||||||
|
|
||||||
|
* set bootable: "POST /v3/{project_id}/volumes/{volume_id}/action"
|
||||||
|
|
||||||
|
* volume readonly update: "POST /v3/{project_id}/volumes/{volume_id}/action"
|
||||||
|
|
||||||
|
.. _`[json-schema-validation]`: https://blueprints.launchpad.net/cinder/+spec/json-schema-validation
|
Loading…
x
Reference in New Issue
Block a user