Query NVMe Lun
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/nvme/lunscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/nvme/luns/066996e131e03824a7ef6a22defed432Queryable Fields
Run the CLI command tool, enter QueryNvmeLun and press Tab to view all queryable fields and resource names that can be queried across tables.
API Response
Response Example
{
"inventories": [
{
"nvmeTargetUuid": "f04819a9445c3d068c075e753d48fc3c",
"nvmeLunHostRefs": [],
"name": "nvme-lun-36b083fe000daf018000022905ba35d8f",
"uuid": "138c10cda11c3b8e9c7d988350d5cf64",
"wwid": "uuid.48daeab7-7f15-405e-8481-7152cb9b0aca",
"wwn": "uuid.48daeab7-7f15-405e-8481-7152cb9b0aca",
"serial": "3d87eca1686c1782",
"type": "disk",
"path": "nvme-uuid.48daeab7-7f15-405e-8481-7152cb9b0aca ",
"size": 5497558138880
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 4.6.21 | |
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. For details, see error | 4.6.21 |
| inventories | List | For details, see inventories | 4.6.21 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 | 4.6.21 |
| description | String | Brief summary of the error | 4.6.21 |
| details | String | Detailed error information | 4.6.21 |
| elaboration | String | Reserved field, defaults to null | 4.6.21 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 4.6.21 |
| cause | ErrorCode | Root cause: the source error that triggered the current error. If there is no original error, this field is null | 4.6.21 |
inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeTargetUuid | String | NVMe device UUID | 4.6.21 |
| name | String | Resource name | 4.6.21 |
| uuid | String | Resource UUID, uniquely identifies the resource | 4.6.21 |
| wwid | String | Global unique identifier | 4.6.21 |
| vendor | String | Vendor | 4.6.21 |
| model | String | Model | 4.6.21 |
| wwn | String | 4.6.21 | |
| serial | String | Serial number | 4.6.21 |
| type | String | Type | 4.6.21 |
| hctl | String | 4.6.21 | |
| path | String | Path | 4.6.21 |
| state | String | State | 4.6.21 |
| size | Long | Size | 4.6.21 |
| multipathDeviceUuid | String | Multipath device UUID | 4.6.21 |
| source | String | Disk source, NVMe | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
| nvmeLunHostRefs | List | For details, see nvmeLunHostRefs | 4.6.21 |
nvmeLunHostRefs
| Name | Type | Description | Starting Version |
|---|---|---|---|
| nvmeLunUuid | List | NVMe disk UUID | 4.6.21 |
| hostUuid | String | Host UUID | 4.6.21 |
| path | String | Disk path | 4.6.21 |
| hctl | String | Disk HCTL | 4.6.21 |
| createDate | Timestamp | Creation time | 4.6.21 |
| lastOpDate | Timestamp | Last modification time | 4.6.21 |
SDK Examples
Java SDK
QueryNvmeLunAction action = new QueryNvmeLunAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryNvmeLunAction.Result res = action.call();Python SDK
QueryNvmeLunAction action = QueryNvmeLunAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryNvmeLunAction.Result res = action.call()