QueryBareMetal2ChassisGpuDevice
API Request
URLs
GET zstack/v1/baremetal2/chassis/gpu-device/gpu-devicesGET zstack/v1/baremetal2/chassis/gpu-device/gpu-devices/{uuid}Headers
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/baremetal2/chassis/gpu-device/gpu-devices?curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/baremetal2/chassis/gpu-device/gpu-devices/0182e9be97a2385f9e32ff2f77540abbQueryable Fields
You can check all queryable fields and resource names that can be queried across
tables by using zstack-cli, entering
QueryBareMetal2ChassisGpuDevice, and pressing the Tab
key.
API Response
Sample Response
{
"inventories": [
{}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 5.1.8 | |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 5.1.8 |
| inventories | List | See inventories. | 5.1.8 |
#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 5.1.8 |
| description | String | The detailed description of the resource. | 5.1.8 |
| details | String | The details about the error. | 5.1.8 |
| elaboration | String | The reserved field. Default value: null. | 5.1.8 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 5.1.8 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 5.1.8 |
#inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| serialNumber | String | 5.1.8 | |
| memory | String | 5.1.8 | |
| power | String | 5.1.8 | |
| uuid | String | The resource UUID. | 5.1.8 |
| chassisUuid | String | 5.1.8 | |
| description | String | The resource description. | 5.1.8 |
| type | String | 5.1.8 | |
| pciDeviceAddress | String | 5.1.8 | |
| vendorId | String | 5.1.8 | |
| deviceId | String | 5.1.8 | |
| subvendorId | String | 5.1.8 | |
| subdeviceId | String | 5.1.8 | |
| iommuGroup | String | 5.1.8 | |
| name | String | The resource name. | 5.1.8 |
| vendor | String | 5.1.8 | |
| device | String | 5.1.8 | |
| createDate | Timestamp | The creation date. | 5.1.8 |
| lastOpDate | Timestamp | The last operation date. | 5.1.8 |
SDK Sample
Java
SDK
QueryBareMetal2ChassisGpuDeviceAction action = new QueryBareMetal2ChassisGpuDeviceAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryBareMetal2ChassisGpuDeviceAction.Result res = action.call();Python
SDK
QueryBareMetal2ChassisGpuDeviceAction action = QueryBareMetal2ChassisGpuDeviceAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryBareMetal2ChassisGpuDeviceAction.Result res = action.call()