Browse Source

[api-ref]Add api ref for "volume type encryption"

the api ref for "volume type encryption" is missing.

Change-Id: I4320426ac8270da4922f4ae3d8b1ca8d732f25b1
Closes-bug: #1562043
changes/20/415320/6
wangxiyuan 4 years ago
parent
commit
3f7200b6da
7 changed files with 308 additions and 1 deletions
  1. +92
    -1
      api-ref/source/v3/parameters.yaml
  2. +8
    -0
      api-ref/source/v3/samples/encryption-type-create-request.json
  3. +10
    -0
      api-ref/source/v3/samples/encryption-type-create-response.json
  4. +12
    -0
      api-ref/source/v3/samples/encryption-type-show-response.json
  5. +7
    -0
      api-ref/source/v3/samples/encryption-type-update-request.json
  6. +7
    -0
      api-ref/source/v3/samples/encryption-type-update-response.json
  7. +172
    -0
      api-ref/source/v3/volumes-v3-types.inc

+ 92
- 1
api-ref/source/v3/parameters.yaml View File

@ -31,6 +31,12 @@ consistencygroup_id_2:
in: path
required: false
type: string
encryption_id:
description: |
The ID of the encryption type.
in: path
required: true
type: string
force_3:
description: |
To delete a QoS specification even if it is in-
@ -63,6 +69,12 @@ hostname:
in: path
required: false
type: string
project_id_path:
description: |
The UUID of the project in a multi-tenancy cloud.
in: path
required: false
type: string
qos_id:
description: |
The ID of the QoS specification.
@ -349,6 +361,13 @@ cgsnapshot_id:
in: body
required: false
type: string
cipher:
description: |
The encryption algorithm or mode. For example, aes-xts-plain64. The default
value is None.
in: body
required: false
type: string
cluster_mutex:
description: |
The OpenStack Block Storage cluster where the resource resides. Optional
@ -392,6 +411,13 @@ container:
in: body
required: true
type: string
control_location:
description: |
Notional service where encryption is performed. Valid values are
"front-end" or "back-end". The default value is "front-end".
in: body
required: false
type: string
cores:
description: |
The number of instance cores that are allowed for
@ -430,6 +456,33 @@ delete-volumes:
in: body
required: false
type: boolean
deleted:
description: |
The resource is deleted or not.
in: body
required: true
type: boolean
deleted_at:
description: |
The date and time when the resource was deleted.
The date and time stamp format is `ISO 8601
<https://en.wikipedia.org/wiki/ISO_8601>`_:
::
CCYY-MM-DDThh:mm:ss±hh:mm
For example, ``2015-08-27T09:49:58-05:00``.
The ``±hh:mm`` value, if included, is the time zone as an offset
from UTC. In the previous example, the offset value is ``-05:00``.
If the ``deleted_at`` date and time stamp is not set, its value is
``null``.
in: body
required: true
type: string
description:
description: |
The backup description or null.
@ -533,6 +586,18 @@ encrypted:
in: body
required: true
type: boolean
encryption:
description: |
The encryption information.
in: body
required: true
type: object
encryption_id_body:
description: |
The UUID of the encryption.
in: body
required: true
type: string
extra_specs:
description: |
A set of key and value pairs that contains the
@ -796,9 +861,17 @@ key_pairs:
in: body
required: true
type: integer
key_size:
description: |
Size of encryption key, in bits. For example, 128 or 256. The default value
is None.
in: body
required: false
type: integer
keys:
description: |
List of Keys.
List of Keys. For example, CryptsetupEncryptor, LuksEncryptor or
NoOpEncryptor.
in: body
required: true
type: array
@ -1259,6 +1332,18 @@ properties:
in: body
required: true
type: object
provider:
description: |
The class that provides encryption support.
in: body
required: true
type: string
provider_optional:
description: |
The class that provides encryption support.
in: body
required: false
type: string
qos_specs:
description: |
A ``qos_specs`` object.
@ -1706,6 +1791,12 @@ volume_type_5:
in: body
required: true
type: array
volume_type_id_body:
description: |
The UUID of the volume type.
in: body
required: true
type: string
volume_types:
description: |
The list of volume types. In an environment with


+ 8
- 0
api-ref/source/v3/samples/encryption-type-create-request.json View File

@ -0,0 +1,8 @@
{
"encryption":{
"key_size": 128,
"provider": "nova.volume.encryptors.luks.LuksEncryptor",
"control_location":"front-end",
"cipher": "aes-xts-plain64"
}
}

+ 10
- 0
api-ref/source/v3/samples/encryption-type-create-response.json View File

@ -0,0 +1,10 @@
{
"encryption": {
"volume_type_id": "2d29462d-76cb-417c-8a9f-fb23140f1577",
"control_location": "front-end",
"encryption_id": "81e069c6-7394-4856-8df7-3b237ca61f74",
"key_size": 128,
"provider": "nova.volume.encryptors.luks.LuksEncryptor",
"cipher": "aes-xts-plain64"
}
}

+ 12
- 0
api-ref/source/v3/samples/encryption-type-show-response.json View File

@ -0,0 +1,12 @@
{
"volume_type_id": "2d29462d-76cb-417c-8a9f-fb23140f1577",
"control_location": "front-end",
"deleted": false,
"created_at": "2016-12-28T02:32:25.000000",
"updated_at": null,
"encryption_id": "81e069c6-7394-4856-8df7-3b237ca61f74",
"key_size": 128,
"provider": "nova.volume.encryptors.luks.LuksEncryptor",
"deleted_at": null,
"cipher": "aes-xts-plain64"
}

+ 7
- 0
api-ref/source/v3/samples/encryption-type-update-request.json View File

@ -0,0 +1,7 @@
{
"encryption":{
"key_size": 64,
"provider": "cinder.keymgr.conf_key_mgr.ConfKeyManager",
"control_location":"back-end"
}
}

+ 7
- 0
api-ref/source/v3/samples/encryption-type-update-response.json View File

@ -0,0 +1,7 @@
{
"encryption":{
"key_size": 64,
"provider": "cinder.keymgr.conf_key_mgr.ConfKeyManager",
"control_location":"back-end"
}
}

+ 172
- 0
api-ref/source/v3/volumes-v3-types.inc View File

@ -271,3 +271,175 @@ Response Example
.. literalinclude:: ./samples/volume-type-show-response.json
:language: javascript
Show an encryption type
==========================
.. rest_method:: GET /v3/{project_id}/types/{volume_type_id}/encryption
Show an encryption type.
To show an encryption type for an existing volume type.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- volume_type: volume_type
- project_id: project_id_path
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- volume_type_id: volume_type_id_body
- encryption_id: encryption_id
- encryption: encryption
- key_size: key_size
- provider: provider
- control_location: control_location
- cipher: cipher
- deleted: deleted
- created_at: created_at
- updated_at: updated_at
- deleted_at: deleted_at
Response Example
----------------
.. literalinclude:: ./samples/encryption-type-show-response.json
:language: javascript
Delete an encryption type
==========================
.. rest_method:: GET /v3/{project_id}/types/{volume_type_id}/encryption/{encryption_id}
Delete an encryption type.
To delete an encryption type for an existing volume type.
Normal response codes: 202
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- volume_type: volume_type
- project_id: project_id_path
- encryption_id: encryption_id
Create an encryption type
==========================
.. rest_method:: POST /v3/{project_id}/types/{volume_type_id}/encryption
Creates an encryption type.
To create an encryption type for an existing volume type.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- volume_type: volume_type
- project_id: project_id_path
- encryption: encryption
- key_size: key_size
- provider: provider
- control_location: control_location
- cipher: cipher
Request Example
---------------
.. literalinclude:: ./samples/encryption-type-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- volume_type_id: volume_type_id_body
- encryption_id: encryption_id
- encryption: encryption
- key_size: key_size
- provider: provider
- control_location: control_location
- cipher: cipher
Response Example
----------------
.. literalinclude:: ./samples/encryption-type-create-response.json
:language: javascript
Update an encryption type
==========================
.. rest_method:: POST /v3/{project_id}/types/{volume_type_id}/encryption/{encryption_id}
Update an encryption type.
To update an encryption type for an existing volume type.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- volume_type: volume_type
- project_id: project_id_path
- encryption_id: encryption_id
- encryption: encryption
- key_size: key_size
- provider: provider_optional
- control_location: control_location
- cipher: cipher
Request Example
---------------
.. literalinclude:: ./samples/encryption-type-update-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- encryption: encryption
- key_size: key_size
- provider: provider_optional
- control_location: control_location
- cipher: cipher
Response Example
----------------
.. literalinclude:: ./samples/encryption-type-update-response.json
:language: javascript

Loading…
Cancel
Save