From 3f7200b6da8d79052e86f329a0732be4e1471ea2 Mon Sep 17 00:00:00 2001 From: wangxiyuan Date: Wed, 28 Dec 2016 10:38:49 +0800 Subject: [PATCH] [api-ref]Add api ref for "volume type encryption" the api ref for "volume type encryption" is missing. Change-Id: I4320426ac8270da4922f4ae3d8b1ca8d732f25b1 Closes-bug: #1562043 --- api-ref/source/v3/parameters.yaml | 93 +++++++++- .../encryption-type-create-request.json | 8 + .../encryption-type-create-response.json | 10 + .../encryption-type-show-response.json | 12 ++ .../encryption-type-update-request.json | 7 + .../encryption-type-update-response.json | 7 + api-ref/source/v3/volumes-v3-types.inc | 172 ++++++++++++++++++ 7 files changed, 308 insertions(+), 1 deletion(-) create mode 100644 api-ref/source/v3/samples/encryption-type-create-request.json create mode 100644 api-ref/source/v3/samples/encryption-type-create-response.json create mode 100644 api-ref/source/v3/samples/encryption-type-show-response.json create mode 100644 api-ref/source/v3/samples/encryption-type-update-request.json create mode 100644 api-ref/source/v3/samples/encryption-type-update-response.json diff --git a/api-ref/source/v3/parameters.yaml b/api-ref/source/v3/parameters.yaml index 74e1ac41f66..0af7b2b030f 100644 --- a/api-ref/source/v3/parameters.yaml +++ b/api-ref/source/v3/parameters.yaml @@ -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 + `_: + + :: + + 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 diff --git a/api-ref/source/v3/samples/encryption-type-create-request.json b/api-ref/source/v3/samples/encryption-type-create-request.json new file mode 100644 index 00000000000..f93c1426144 --- /dev/null +++ b/api-ref/source/v3/samples/encryption-type-create-request.json @@ -0,0 +1,8 @@ +{ + "encryption":{ + "key_size": 128, + "provider": "nova.volume.encryptors.luks.LuksEncryptor", + "control_location":"front-end", + "cipher": "aes-xts-plain64" + } +} diff --git a/api-ref/source/v3/samples/encryption-type-create-response.json b/api-ref/source/v3/samples/encryption-type-create-response.json new file mode 100644 index 00000000000..3e2a2aeec58 --- /dev/null +++ b/api-ref/source/v3/samples/encryption-type-create-response.json @@ -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" + } +} diff --git a/api-ref/source/v3/samples/encryption-type-show-response.json b/api-ref/source/v3/samples/encryption-type-show-response.json new file mode 100644 index 00000000000..83ecab88bba --- /dev/null +++ b/api-ref/source/v3/samples/encryption-type-show-response.json @@ -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" +} \ No newline at end of file diff --git a/api-ref/source/v3/samples/encryption-type-update-request.json b/api-ref/source/v3/samples/encryption-type-update-request.json new file mode 100644 index 00000000000..7a587b77146 --- /dev/null +++ b/api-ref/source/v3/samples/encryption-type-update-request.json @@ -0,0 +1,7 @@ +{ + "encryption":{ + "key_size": 64, + "provider": "cinder.keymgr.conf_key_mgr.ConfKeyManager", + "control_location":"back-end" + } +} \ No newline at end of file diff --git a/api-ref/source/v3/samples/encryption-type-update-response.json b/api-ref/source/v3/samples/encryption-type-update-response.json new file mode 100644 index 00000000000..7a587b77146 --- /dev/null +++ b/api-ref/source/v3/samples/encryption-type-update-response.json @@ -0,0 +1,7 @@ +{ + "encryption":{ + "key_size": 64, + "provider": "cinder.keymgr.conf_key_mgr.ConfKeyManager", + "control_location":"back-end" + } +} \ No newline at end of file diff --git a/api-ref/source/v3/volumes-v3-types.inc b/api-ref/source/v3/volumes-v3-types.inc index 1f55c5fac2d..ccef7d963ed 100644 --- a/api-ref/source/v3/volumes-v3-types.inc +++ b/api-ref/source/v3/volumes-v3-types.inc @@ -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