• Native OpenStack API

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

List Volumes Details

Function Description

This interface is used to query details of a volume.

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

Interface Format

Method

URI

Description

GET

/v2/{tenant_id}/volumes/detail

Queries information about volumes.

Restrictions

N/A

Expanded Interface

This interface is extended to support the shareable volume feature and allows you to specify the time for querying.

Extended modes include the followings:

  1. Extend fields shareable and updated_at based on native APIs.
  2. change-since can be used as a filter for querying volumes.
  3. Fuzzy search of volumes using name, description, and id is supported.

Request Parameters

request filter parameters

Parameter

Type

Mandatory

Remarks

marker

String

No

Specifies the ID of the last record on the previous page.

name

String

No

Specifies a volume name, which consists of fewer than 255 characters.

limit

Int

No

Specifies the maximum number of query results that can be returned. The value must be an integer greater than 0.

sort_key

String

No

Specifies the keyword based on which the returned results are sorted. The default value is created_at.

sort_dir

String

No

Specifies the result sorting order. The default value is desc (descending order).

offset

Int

No

Specifies the offset.

status

String

No

Specifies the volume status, including available, in-use, error, error_deleting, and extending.

metadata

String

No

Specifies the volume metadata.

availability-zone

String

No

Specifies the AZ to which the volume belongs.

changes-since

String

No

Specifies the time when the volume is updated, for example, 2016-01-08T09:41:18. Only administrators can set this parameter.

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

The time that the volume is 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

No

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.

volumes_links

List

No

Specifies to query the volume position. This field is the peer field of volumes in the response body. If only partial volumes are displayed in the query result, the returned message will include this field.

Request Example

GET /v2/dd14c6ac581f40059e27f5320b60bf2f/volumes/detail?limit=3&marker=3f1b98ec-a8b5-4e92-a727-88def62d5ad3

Response Example

{
    "volumes": [
        {
            "attachments": [],
            "availability_zone": "eu-de-01",
            "bootable": "false",
            "consistencygroup_id": null,
            "created_at": "2016-05-25T02:42:10.856332",
            "description": null,
            "encrypted": false,
            "id": "b104b8db-170d-441b-897a-3c8ba9c5a214",
            "links": [
                {
                    "href": "https://volume.localdomain.com:8776/v2/dd14c6ac581f40059e27f5320b60bf2f/volumes/b104b8db-170d-441b-897a-3c8ba9c5a214",
                    "rel": "self"
                },
                {
                    "href": "https://volume.localdomain.com:8776/dd14c6ac581f40059e27f5320b60bf2f/volumes/b104b8db-170d-441b-897a-3c8ba9c5a214",
                    "rel": "bookmark"
                }
            ],
            "metadata": {
                "__openstack_region_name": "pod01.eu-de-01",
                "a": "b",
                "quantityGB": "1",
                "volInfoUrl": "fusionstorage://172.30.64.10/0/FEFEEB07D3924CDEA93C612D4E16882D"
            },
            "name": "zjb_u25_test",
            "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": "dd14c6ac581f40059e27f5320b60bf2f",
            "os-volume-replication:driver_data": null,
            "os-volume-replication:extended_status": null,
            "replication_status": "disabled",
            "shareable": false,
"multiattach": false,
            "size": 1,
            "snapshot_id": null,
            "source_volid": null,
            "status": "available",
            "updated_at": "2016-05-25T02:42:22.341984",
            "user_id": "b0524e8342084ef5b74f158f78fc3049",
            "volume_type": "SATA"
        }
    ],
    "volumes_links": [
        {
            "href": "https://volume.localdomain.com:8776/v2/dd14c6ac581f40059e27f5320b60bf2f/volumes/detail?limit=1&marker=b104b8db-170d-441b-897a-3c8ba9c5a214",
            "rel": "next"
        }
    ]
}

Error Code

See section Processing Return Code.