Query Raid Physical Drive Self-Test History

GET/zstack/v1/storage-devices/local-raid/physical-drives/self-test
GET/zstack/v1/storage-devices/local-raid/physical-drives/{raidPhysicalDriveUuid}/self-test

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/local-raid/physical-drives/self-test
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/local-raid/physical-drives/{raidPhysicalDriveUuid}/self-test

Queryable Fields

Run the CLI command-line tool, enter QueryPhysicalDriveSelfTestHistory and press Tab to view all queryable fields and resource names that support cross-table queries.

API Response

Response Example

{
  "inventories": [
    {
      "id": 1,
      "raidPhysicalDriveUuid": "18862cfe4f383f1c8f4e6e64e8de9f4c",
      "runningState": "Success",
      "testResult": "Completed without error",
      "createDate": "Nov 14, 2017 2:20:57 PM",
      "lastOpDate": "Nov 14, 2017 2:20:57 PM"
    },
    {
      "id": 2,
      "raidPhysicalDriveUuid": "adbdac3931c03ab0a1ff769558816563",
      "runningState": "Success",
      "testResult": "Completed without error",
      "createDate": "Nov 14, 2017 2:20:57 PM",
      "lastOpDate": "Nov 14, 2017 2:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See error for details3.6
inventoriesListSee inventories for details3.6

error

NameTypeDescriptionStarting Version
codeStringError code number. Globally unique identifier of the error, for example SYS.1000, HOST.1001.0.6
descriptionStringBrief error description0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, defaults to null0.6
opaqueLinkedHashMapReserved field, defaults to null0.6
causeErrorCodeRoot cause error. The error that caused the current error. If there is no original error, this field is null.0.6

inventories

NameTypeDescriptionStarting Version
idLongId3.6
raidPhysicalDriveUuidStringRaid Physical Drive Uuid3.6
testResultStringSelf-test result3.6
createDateTimestampCreate time3.6
lastOpDateTimestampLast update time3.6
runningStateRunningStateSee runningState for details3.6

runningState

NameTypeDescriptionStarting Version
RunningRunningStateIn progress3.6
SuccessRunningStateCompleted successfully3.6
FailedRunningStateExecution failed3.6

SDK Examples

Java SDK

QueryPhysicalDriveSelfTestHistoryAction action = new QueryPhysicalDriveSelfTestHistoryAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryPhysicalDriveSelfTestHistoryAction.Result res = action.call();

Python SDK

QueryPhysicalDriveSelfTestHistoryAction action = QueryPhysicalDriveSelfTestHistoryAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryPhysicalDriveSelfTestHistoryAction.Result res = action.call()