• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Cinder V2 Interfaces
  5. Volumes
  6. Show Volume

Show Volume

Function Description

This interface is used to query information about a volume.

This interface is only used to query data in the database.

Interface Format

Method

URI

Description

GET

/v2/{tenant_id}/volumes/{volume_id}

Queries information about a volume.

Restrictions

N/A

Expanded Interface

Extension cause: to be compatible with the shared volume parameters of the old version

Extension method: The shareable field is extended based on the native interface.

Request Parameter

N/A

Response Parameter

Parameter

Type

Mandatory

Remarks

id

Uuid

Yes

Specifies the volume ID.

links

List(Dict)

Yes

Specifies the URI description information about the volume.

name

String

No

Specifies the volume name.

status

String

Yes

Specifies the volume status.

attachments

List(Dict)

No

Specifies the volume attachment information.

availability_zone

String

Yes

Specifies the AZ to which the volume belongs.

os-vol-host-attr:host

String

Yes

Specifies the host to which the volume belongs.

source_volid

String

No

Specifies the source volume ID. If the volume is created using a source volume, this parameter has a value.

snapshot_id

String

No

Specifies the snapshot ID. If the disk is created using a snapshot, this parameter has a value.

description

String

No

Description

created_at

String

Yes

Specifies the time when the volume was created.

volume_type

String

Yes

Specifies the volume type.

os-vol-tenant-attr:tenant_id

String

Yes

Specifies the ID of the tenant to which the volume belongs.

size

Int

Yes

Specifies the size of the volume.

metadata

Dict

Yes

Specifies the metadata of the volume.

If the metadata does not contain the hw:passthrough field, the device type of the EVS disk is VBD by default. If the metadata does not contain the __system__encrypted field, the EVS disk is not encrypted by default.

os-vol-mig-status-attr:migstat

String

Yes

Specifies the volume migration status.

os-vol-mig-status-attr:name_id

String

Yes

Specifies the ID of the volume migration name.

os-volume-replication:driver_data

String

Yes

Specifies the data of the volume duplication driver.

os-volume-replication:extended_status

String

Yes

Specifies the extended status of the volume duplication.

encrypted

Boolean

Yes

Specifies whether a volume is encrypted.

replication_status

String

Yes

Specifies the volume backup status.

user_id

String

Yes

Specifies the ID of the volume user.

consistencygroup_id

String

No

Specifies the ID of the consistency group accommodating the volume.

bootable

String

Yes

Specifies whether a volume is bootable.

updated_at

String

No

Specifies the time when a volume was updated.

shareable

Boolean

Yes

Specifies whether a volume is shareable.

multiattach

Boolean

Yes

Specifies whether a volume is shareable.

volume_image_metadata

Dict

No

This field is specified only when the volume is created using an image.

Request Example

GET /v2/5dd0b0056f3d47b6ab4121667d35621a/volumes/f62eee48-f237-4de9-b18b-1fadaa5c2014

Response Example

{
    "volume": {
        "attachments": [
            {
                "attachment_id": "4ae9e488-7355-4d85-a3c3-0efb143b076d",
                "device": "/dev/vda",
                "host_name": null,
                "id": "f62eee48-f237-4de9-b18b-1fadaa5c2014",
                "server_id": "1fc53995-ad08-4433-aa1e-7793d317bb56",
                "volume_id": "f62eee48-f237-4de9-b18b-1fadaa5c2014"
            }
        ],
        "availability_zone": "eu-de-01",
        "bootable": "true",
        "consistencygroup_id": null,
        "created_at": "2016-05-19T11:24:39.229059",
        "description": null,
        "encrypted": false,
        "id": "f62eee48-f237-4de9-b18b-1fadaa5c2014",
        "links": [
            {
                "href": "https://volume.localdomain.com:8776/v2/5dd0b0056f3d47b6ab4121667d35621a/volumes/f62eee48-f237-4de9-b18b-1fadaa5c2014",
                "rel": "self"
            },
            {
                "href": "https://volume.localdomain.com:8776/5dd0b0056f3d47b6ab4121667d35621a/volumes/f62eee48-f237-4de9-b18b-1fadaa5c2014",
                "rel": "bookmark"
            }
        ],
        "metadata": {
            "__openstack_region_name": "pod01.eu-de-01",
            "attached_mode": "rw",
            "quantityGB": "40",
            "readonly": "False",
            "volInfoUrl": "fusionstorage://172.30.64.10/0/283CA1C1228B4256A0FB6B8B2C549C00"
        },
        "name": "DT_Autotest_Init_ZYR_vm_evs_stopped_001",
        "os-vol-host-attr:host": "pod01.eu-de-01#SATA",
        "os-vol-mig-status-attr:migstat": null,
        "os-vol-mig-status-attr:name_id": null,
        "os-vol-tenant-attr:tenant_id": "5dd0b0056f3d47b6ab4121667d35621a",
        "os-volume-replication:driver_data": null,
        "os-volume-replication:extended_status": null,
        "replication_status": "disabled",
        "shareable": false,
"multiattach": false,
        "size": 40,
        "snapshot_id": null,
        "source_volid": null,
        "status": "in-use",
        "updated_at": "2016-05-19T11:39:59.909657",
        "user_id": "39f6696ae23740708d0f358a253c2637",
        "volume_image_metadata": {
            "__image_source_type": "uds",
            "__imagetype": "gold",
            "__isregistered": "true",
            "__os_bit": "64",
            "__os_type": "Linux",
            "__os_version": "Novell SUSE Linux Enterprise Server 12 SP1 64bit",
            "__platform": "SUSE",
            "checksum": "d41d8cd98f00b204e9800998ecf8427e",
            "container_format": "bare",
            "disk_format": "vhd",
            "image_id": "07345146-2823-44f7-ad02-f95597df0640",
            "image_name": "Public_Suse_Enterprise_Linux_R12_SP1",
            "min_disk": "40",
            "min_ram": "2048",
            "size": "0",
            "virtual_env_type": "FusionCompute"
        },
        "volume_type": "SATA"
    }
}

Error Codes

See section Processing Return Code.