Attaching an EVS Disk to a BMS

Function

This API is used to attach EVS disks to a BMS as data disks after the BMS is created if existing disks are insufficient or cannot meet requirements.

Constraints

URI

POST /v1/{project_id}/baremetalservers/{server_id}/attachvolume

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

Response

Table 3 Normal response

Parameter

Type

Description

job_id

String

Specifies the task ID returned after a task command is issued. The task ID can be used to query the execution status of the task.

For details about how to query the task execution status based on job_id, see Querying Task Statuses.

Table 4 Abnormal response

Parameter

Type

Description

error

Dictionary data structure

Specifies the error returned when a task submission encounters an exception. For details, see Table 5.

Table 5 error data structure

Parameter

Type

Description

message

String

Specifies the error message.

code

String

Specifies the error code.

Example Response

Returned Values

Normal values

Returned Value

Description

202

The request has been accepted, but the processing has been delayed.

For details about other returned values, see Status Codes.

Error Codes

See Error Codes.