Reinstalling the BMS OS

Function

This API is used to reinstall the BMS OS. The OS of BMSs supporting quick provisioning can be reinstalled using the original image without any change to the data disks. Password and key pair injection are supported during OS reinstallation.

To check whether a BMS is quickly provisioned, use the Querying Details About Flavors and Extended Flavor Information API.

This is an asynchronous API. Calling the API successfully indicates that the task is delivered successfully. To check whether the task is successful, use the Querying Task Statuses API.

Constraints

URI

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

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 4 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 5 Abnormal response

Parameter

Type

Description

error

Dictionary data structure

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

Table 6 error data structure

Parameter

Type

Description

message

String

Specifies the error message.

code

String

Specifies the error code.

Example Response

{ 
    "job_id": "70a599e0-31e7-49b7-b260-868f441e862b" 
} 

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.