查询HBA卡信息

GET/zstack/v1/storage-devices/hba
GET/zstack/v1/storage-devices/hba/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl示例

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/hba?q=uuid=db041d8a238732be82740eaf5a43d252
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/hba/1698716626f33b6fb1637a76590e1fe6

可查询字段

运行CLI命令行工具,输入QueryFcHbaDevice并按Tab键查看所有可查询字段以及可跨表查询的资源名。

API返回

返回示例

{
  "inventories": [
    {
      "portName": "10000090fab38778",
      "portState": "Online",
      "speed": "8 Gbit",
      "supportedSpeeds": "16 Gbit",
      "symbolicName": "QLE2692 FW:v9.07.00 DVR:v10.02.00.106-k",
      "supportedClasses": "Class 3",
      "uuid": "511a5ac34b423ac99a33d5c863531d2e",
      "name": "host",
      "hostUuid": "38e3ebc0b54e3cf8a99db5f7c80ee59e",
      "hbaType": "FC"
    }
  ]
}
名字类型描述起始版本
successboolean 5.3.0
inventoriesList详情参考inventories5.2.0
errorErrorCode错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error5.3.0

inventories

名字类型描述起始版本
uuidString资源的UUID,唯一标示该资源5.3.0
nameString资源名称5.3.0
hostUuidString主机UUID5.3.0
portNameString端口名字5.3.0
portStateString端口状态5.3.0
hbaTypeString类型5.3.0
speedString速度5.3.0
supportedSpeedsString支持的速度5.3.0
symbolicNameString符号名称5.3.0
supportedClassesString服务类别5.3.0
createDateString创建时间5.3.0
lastOpDateString最后一次修改时间5.3.0

error

名字类型描述起始版本
codeString错误码号,错误的全局唯一标识,例如SYS.1000, HOST.10010.6
descriptionString错误的概要描述0.6
detailsString错误的详细信息0.6
elaborationString保留字段,默认为null0.6
opaqueLinkedHashMap保留字段,默认为null0.6
causeErrorCode根错误,引发当前错误的源错误,若无原错误,该字段为null0.6

SDK示例

Java SDK

QueryFcHbaDeviceAction action = new QueryFcHbaDeviceAction();
action.conditions = asList("uuid=744cbe74c6f8365dafdbcf9568cfafa0");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryFcHbaDeviceAction.Result res = action.call();

Python SDK

QueryFcHbaDeviceAction action = QueryFcHbaDeviceAction()
action.conditions = ["uuid=e8b3f35dce0c38da8cec8a56347899e9"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryFcHbaDeviceAction.Result res = action.call()