Querying EVS Disks Attached to a BMS

Function

This API is used to query EVS disks attached to a BMS.

URI

GET /v1/{project_id}/baremetalservers/{server_id}/os-volume_attachments

Table 1 lists the parameters.

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

For details about how to obtain the project ID, see Obtaining a Project ID.

server_id

Yes

Specifies the BMS ID.

You can obtain the BMS ID from the BMS console or by calling the Querying BMSs (Native OpenStack API).

Request

  • Request parameters

    None

  • Example request

    GET https://{BMS Endpoint}/v1/bbf1946d374b44a0a2a95533562ba954/baremetalservers/4d8c3732-a248-40ed-bebc-539a6ffd25c0/os-volume_attachments
    

Response

  • Response parameters

    Parameter

    Type

    Description

    volumeAttachments

    Array of objects

    Specifies disks attached to a BMS. For details, see Table 2.

    Table 2 volumeAttachments field data structure description

    Parameter

    Type

    Description

    device

    String

    Specifies the mount directory, for example, dev/sdd.

    id

    String

    Specifies the ID of the attached resource.

    serverId

    String

    Specifies the ID of the BMS to which the disk is attached.

    volumeId

    String

    Specifies the ID of the disk attached to the BMS.

  • Example response

    {
        "volumeAttachments": [
            {
                "device": "/dev/sdd",
                "id": "a26887c6-c47b-4654-abb5-dfadf7d3f803",
                "serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
                "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803"
            },
            {
                "device": "/dev/sdc",
                "id": "a26887c6-c47b-4654-abb5-dfadf7d3f804",
                "serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
                "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f804"
            }
        ]
    }
    

Returned Values

Normal values

Returned Values

Description

200

The request has been successfully processed.

For details about other returned values, see Status Codes.

Error Codes

See Error Codes.