From ac21c6674c8444edc5afd25b7d63936182fe3580 Mon Sep 17 00:00:00 2001 From: Lee Yarwood Date: Wed, 11 Aug 2021 14:14:12 +0100 Subject: api: Introduce microversion 2.89 adjusting os-volume_attachments This microversion adds attachment_id and bdm_uuid as stored in the underlying bdm record while also removing the duplicate id field from the responses of ``GET /servers/{server_id}/os-volume_attachments`` and ``GET /servers/{server_id}/os-volume_attachments/{volume_id}``. To accomidate this within the _translate_attachment_summary_view helper is folded into _translate_attachment_detail_view with the remaining caller in the now deprecated os-volumes API now replaced with a static dictionary. Blueprint: add-attachmentid-to-responses-of-the-os-volume-attachments-api Change-Id: I977c3fd9bbb1e1d42e6979222137e7366d2815e8 --- api-ref/source/os-volume-attachments.inc | 18 +++++++++++------- api-ref/source/parameters.yaml | 27 +++++++++++++++++++++------ 2 files changed, 32 insertions(+), 13 deletions(-) (limited to 'api-ref') diff --git a/api-ref/source/os-volume-attachments.inc b/api-ref/source/os-volume-attachments.inc index 0ebc0cb75e..803d59dc61 100644 --- a/api-ref/source/os-volume-attachments.inc +++ b/api-ref/source/os-volume-attachments.inc @@ -34,21 +34,23 @@ Response .. rest_parameters:: parameters.yaml - volumeAttachments: volumeAttachments - - id: attachment_id_required + - id: volume_attachment_id_resp - serverId: server_id - volumeId: volumeId_resp - device: attachment_device_resp - tag: device_tag_bdm_attachment_resp - delete_on_termination: delete_on_termination_attachments_resp + - attachment_id: attachment_volume_id_resp + - bdm_uuid: attachment_bdm_id_resp **Example List volume attachments for an instance: JSON response** .. literalinclude:: ../../doc/api_samples/os-volumes/list-volume-attachments-resp.json :language: javascript -**Example List tagged volume attachments for an instance (v2.79): JSON response** +**Example List tagged volume attachments for an instance (v2.89): JSON response** -.. literalinclude:: ../../doc/api_samples/os-volumes/v2.79/list-volume-attachments-resp.json +.. literalinclude:: ../../doc/api_samples/os-volumes/v2.89/list-volume-attachments-resp.json :language: javascript Attach a volume to an instance @@ -108,7 +110,7 @@ Response - volumeAttachment: volumeAttachment - device: device_resp - - id: attachment_id_required + - id: attachment_id_resp - serverId: server_id - volumeId: volumeId_resp - tag: device_tag_bdm_attachment_resp @@ -154,21 +156,23 @@ Response .. rest_parameters:: parameters.yaml - volumeAttachment: volumeAttachment - - id: attachment_id_required + - id: volume_attachment_id_resp - serverId: server_id - volumeId: volumeId_resp - device: attachment_device_resp - tag: device_tag_bdm_attachment_resp - delete_on_termination: delete_on_termination_attachments_resp + - attachment_id: attachment_volume_id_resp + - bdm_uuid: attachment_bdm_id_resp **Example Show a detail of a volume attachment: JSON response** .. literalinclude:: ../../doc/api_samples/os-volumes/volume-attachment-detail-resp.json :language: javascript -**Example Show a detail of a tagged volume attachment (v2.79): JSON response** +**Example Show a detail of a tagged volume attachment (v2.89): JSON response** -.. literalinclude:: ../../doc/api_samples/os-volumes/v2.79/volume-attachment-detail-resp.json +.. literalinclude:: ../../doc/api_samples/os-volumes/v2.89/volume-attachment-detail-resp.json :language: javascript Update a volume attachment diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 7a7f0b5da7..75bc9854dc 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -1776,6 +1776,13 @@ associate_host: in: body required: true type: string +attachment_bdm_id_resp: + description: | + The UUID of the block device mapping record in Nova for the attachment. + in: body + required: false + type: string + min_version: 2.89 attachment_device_put_req: description: | Name of the device in the attachment object, such as, ``/dev/vdb``. @@ -1796,12 +1803,6 @@ attachment_id_put_req: required: false type: string min_version: 2.85 -attachment_id_required: - description: | - The UUID of the attachment. - in: body - required: true - type: string attachment_id_resp: description: | The UUID of the attachment. @@ -1821,6 +1822,13 @@ attachment_server_id_resp: in: body required: false type: string +attachment_volume_id_resp: + description: | + The UUID of the associated volume attachment in Cinder. + in: body + required: false + type: string + min_version: 2.89 attachment_volumeId_resp: description: | The UUID of the attached volume. @@ -7368,6 +7376,13 @@ volume: in: body required: true type: object +volume_attachment_id_resp: + description: | + The volumeId of the attachment. + in: body + required: false + type: string + max_version: 2.88 volume_id: description: | The source volume ID. -- cgit v1.2.1