Query Raid Physical Drive
Headers
Authorization: OAuth the-session-uuidCurl 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-drivescurl -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/75dae76e484537bbaea154d9348f4e15Queryable Fields
Run the CLI command-line tool, enter QueryLocalRaidPhysicalDrive and press Tab to view all queryable fields and resource names that support cross-table queries.
API Response
Response Example
{
"inventories": [
{
"uuid": "ba2fe0dcd360397a92748ea6efe9ffd6",
"name": "raidPhysical",
"raidLevel": "raid1",
"raidControllerUuid": "1022305d664e34329a63f350a2fd1e02",
"enclosureDeviceId": 252,
"slotNumber": 1,
"diskGroup": 0,
"wwn": "50014ee059f2f491",
"serialNumber": "V6GLEX2S",
"deviceModel": "HGST HUS726T4TALA6L4",
"size": 1000204886016,
"driveState": "Online, Spun Up",
"locateStatus": "Disabled",
"driveType": "SATA",
"mediaType": "HDD",
"rotationRate": 7200,
"createDate": "Nov 14, 2017 2:20:57 PM",
"lastOpDate": "Nov 14, 2017 2:20:57 PM"
},
{}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 0.6 | |
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. See error for details | 3.6 |
| inventories | List | See inventories for details | 3.6 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number. Globally unique identifier of the error, for example SYS.1000, HOST.1001. | 0.6 |
| description | String | Brief error description | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause error. The error that caused the current error. If there is no original error, this field is null. | 0.6 |
inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | UUID of the resource. Uniquely identifies the resource. | 3.6 |
| name | String | Resource name | 3.6 |
| raidLevel | String | Raid level | 3.6 |
| raidControllerUuid | String | Raid Controller Uuid | 3.6 |
| description | String | Resource description | 3.6 |
| enclosureDeviceId | Integer | Enclosure Id | 3.6 |
| slotNumber | Integer | Slot number | 3.6 |
| deviceId | Integer | Device Id | 3.6 |
| diskGroup | Integer | Disk Group Id | 3.6 |
| wwn | String | WWN | 3.6 |
| serialNumber | String | Serial number | 3.6 |
| deviceModel | String | Disk model | 3.6 |
| size | Long | Disk size | 3.6 |
| driveState | String | Disk status | 3.6 |
| driveType | String | Interface type | 3.6 |
| mediaType | String | Media type | 3.6 |
| rotationRate | Integer | Rotation speed | 3.6 |
| createDate | Timestamp | Create time | 3.6 |
| lastOpDate | Timestamp | Last update time | 3.6 |
| locateStatus | LocateStatus | See locateStatus for details | 3.6 |
locateStatus
| Name | Type | Description | Starting Version |
|---|---|---|---|
| Enabled | LocateStatus | Locator LED blinking | 3.6 |
| Disabled | LocateStatus | Locator LED off | 3.6 |
SDK Examples
Java SDK
QueryLocalRaidPhysicalDriveAction action = new QueryLocalRaidPhysicalDriveAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryLocalRaidPhysicalDriveAction.Result res = action.call();Python SDK
QueryLocalRaidPhysicalDriveAction action = QueryLocalRaidPhysicalDriveAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryLocalRaidPhysicalDriveAction.Result res = action.call()