Add block_device_mapping_v2.uuid to api-ref

The sample of block_device_mapping_v2 contains uuid as a parameter
but there is not any explanation of the parameter.
This patch adds it to api-ref.

The following is for explaining the parameter from the code.

  As the following code, source_type is "image" and api_dict["image_id"]
  can be glance image-id on the sample case.

  https://github.com/openstack/nova/blob/master/nova/block_device.py#L197
    api_dict[source_type + '_id'] = device_uuid

  The "image_id" is used for getting image metadata from Glance:

  https://github.com/openstack/nova/blob/master/nova/compute/api.py#L1072
    image_id = bdm['image_id']
    image_meta = self.image_api.get(context, image_id)

Change-Id: I83badab07446c2b1e55cc3b29a3ba9476efc179d
This commit is contained in:
Ken'ichi Ohmichi 2016-12-01 18:26:12 -08:00
parent 04415f51e6
commit 9a5c20af7f
2 changed files with 10 additions and 0 deletions

View File

@ -1151,6 +1151,15 @@ block_device_mapping_v2:
in: body
required: false
type: object
block_device_uuid:
description: |
This is the uuid of source resource. The uuid is point to different resource
based on the source_type. For example if source_type is ``image`` as the above
sample, the block device is created based on the specified image which is gotten
from the image service.
in: body
required: false
type: string
block_migration:
description: |
Set to ``True`` to migrate local disks by using block migration. If the source

View File

@ -302,6 +302,7 @@ Request
- block_device_mapping_v2.delete_on_termination: delete_on_termination
- block_device_mapping_v2.guest_format: guest_format
- block_device_mapping_v2.boot_index: boot_index
- block_device_mapping_v2.uuid: block_device_uuid
- block_device_mapping_v2.tag: device_tag
- config_drive: config_drive
- key_name: key_name