文档目录

查询HBA卡信息(QueryHBADevice)

API请求

URLs
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

可查询字段

运行zstack-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"
    }
  ]
}
名字 类型 描述 起始版本
success boolean 5.3.0
inventories List 详情参考inventories 5.3.0
error ErrorCode 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error 5.3.0
#inventories
名字 类型 描述 起始版本
uuid String 资源的UUID,唯一标示该资源 5.3.0
name String 资源名称 5.3.0
hostUuid String 物理机UUID 5.3.0
portName String 端口名字 5.3.0
portState String 端口状态 5.3.0
hbaType String 类型 5.3.0
speed String 速度 5.3.0
supportedSpeeds String 支持的速度 5.3.0
symbolicName String 符号名称 5.3.0
supportedClasses String 服务类别 5.3.0
createDate String 创建时间 5.3.0
lastOpDate String 最后一次修改时间 5.3.0
#error
名字 类型 描述 起始版本
code String 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 5.3.0
description String 错误的概要描述 5.3.0
details String 错误的详细信息 5.3.0
elaboration String 保留字段,默认为null 5.3.0
opaque LinkedHashMap 保留字段,默认为null 5.3.0
cause ErrorCode 根错误,引发当前错误的源错误,若无原错误,该字段为null 5.3.0

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()
开发手册 | 5.4.12 | ZStack Cloud · ZCF | ZStack 资源中心