查询PCI设备规格信息(QueryPciDeviceOffering)
API请求
URLs
GET zstack/v1/pci-device/pci-device-offerings
GET zstack/v1/pci-device/pci-device-offerings/{uuid}Headers
Authorization: OAuth the-session-uuidCurl示例
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 0356dc4f75ac4798817b29d957ccb4bc" \
-X GET http://localhost:8080/zstack/v1/pci-device/pci-device-offeringscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 159ccf53b07a4b97ba3ea07dcf385f34" \
-X GET http://localhost:8080/zstack/v1/pci-device/pci-device-offerings/a43387ea19d84cecb328c34af59f6292可查询字段
运行CLI命令行工具,输入QueryPciDeviceOffering并按Tab键查看所有可查询字段以及可跨表查询的资源名。
API返回
返回示例
{
"inventories": [
{}
]
}| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| error | ErrorCode | 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error | 2.1 |
| inventories | List | 详情参考inventories | 2.1 |
#error
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| code | String | 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 | 2.1 |
| description | String | 错误的概要描述 | 2.1 |
| details | String | 错误的详细信息 | 2.1 |
| elaboration | String | 保留字段,默认为null | 2.1 |
| opaque | LinkedHashMap | 保留字段,默认为null | 2.1 |
| cause | ErrorCode | 根错误,引发当前错误的源错误,若无原错误,该字段为null | 2.1 |
#inventories
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| uuid | String | 资源的UUID,唯一标示该资源 | 2.1 |
| name | String | 资源名称 | 2.1 |
| description | String | 资源的详细描述 | 2.1 |
| vendorId | String | 2.1 | |
| deviceId | String | 2.1 | |
| subvendorId | String | 2.1 | |
| subdeviceId | String | 2.1 | |
| createDate | Timestamp | 创建时间 | 2.1 |
| lastOpDate | Timestamp | 最后一次修改时间 | 2.1 |
| type | PciDeviceOfferingType | 详情参考type | 2.1 |
| attachedInstanceOfferings | List | 详情参考attachedInstanceOfferings | 2.1 |
| matchedPciDevices | List | 详情参考matchedPciDevices | 2.1 |
#type
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| 类型 | String | 类型,保留字段 | 2.1 |
#attachedInstanceOfferings
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| id | long | 2.1 | |
| instanceOfferingUuid | String | 计算规格UUID | 2.1 |
| pciDeviceOfferingUuid | String | 2.1 | |
| pciDeviceCount | Integer | 2.1 | |
| metadata | PciDeviceMetaData | 详情参考metadata | 2.1 |
#metadata
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| metaData | String | 2.1 | |
| metaDataEntries | List | 详情参考metaDataEntries | 2.1 |
#metaDataEntries
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| key | String | 2.1 | |
| value | String | 2.1 | |
| op | PciDeviceMetaDataOperator | 详情参考op | 2.1 |
#op
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| Equal | PciDeviceMetaDataOperator | 相等 | 2.1 |
| Unequal | PciDeviceMetaDataOperator | 不等 | 2.1 |
#matchedPciDevices
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| pciDeviceUuid | String | 2.1 | |
| pciDeviceOfferingUuid | String | 2.1 |
SDK示例
Java
SDK
QueryPciDeviceOfferingAction action = new QueryPciDeviceOfferingAction();
action.conditions = asList();
action.sessionId = "fa91fe0f572c4ac1bcc975572985eed9";
QueryPciDeviceOfferingAction.Result res = action.call();Python
SDK
QueryPciDeviceOfferingAction action = QueryPciDeviceOfferingAction()
action.conditions = []
action.sessionId = "c194660b515f48c98b469f591cdfe5a2"
QueryPciDeviceOfferingAction.Result res = action.call()