查询FC存储LUN

GET/zstack/v1/storage-devices/fiber-channel/luns
GET/zstack/v1/storage-devices/fiber-channel/luns/{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/fiber-channel/luns
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/fiber-channel/luns/2bb2719f7d45316a80e333c90bbf6e59

可查询字段

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

API返回

返回示例

{
  "inventories": [
    {
      "fiberChannelStorageUuid": "9f1895c8d1b6306e908df42244901617",
      "scsiLunHostRefs": [],
      "scsiLunVmInstanceRefs": [],
      "name": "fc-lun-36b083fe000daf018000022905ba35d8f",
      "uuid": "aaab6d1a63713ae0ac18a21b9547312b",
      "wwid": "36b083fe000daf018000022905ba35d8f",
      "vendor": "DELL",
      "model": "MD32xx",
      "wwn": "0x6f01faf000d5c3e7",
      "serial": "6b083fe000daf018000015505abbe00a",
      "type": "mpath",
      "path": "pci-0000:05:00.0-fc-0x2012b083fedaf018-lun-11",
      "size": 5497558138880
    },
    {
      "fiberChannelStorageUuid": "9452ad8bb69f33c495bf0da260d80003",
      "scsiLunHostRefs": [],
      "scsiLunVmInstanceRefs": [],
      "name": "fc-lun-36f01faf000d5c3e7000023ef5ba362f2",
      "uuid": "cc050d2f06163d9dbf6d82cd61b7f008",
      "wwid": "36f01faf000d5c3e7000023ef5ba362f2",
      "vendor": "DELL",
      "model": "MD32xx",
      "wwn": "0x6b083fe000daf018",
      "serial": "6b083fe000daf018000015505abbe00a",
      "type": "mpath",
      "path": "pci-0000:05:00.0-fc-0x2012b083fedaf018-lun-12",
      "size": 5497558138880
    }
  ]
}
名字类型描述起始版本
successboolean 0.6
errorErrorCode错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error3.1.0
inventoriesList详情参考inventories3.1.0

error

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

inventories

名字类型描述起始版本
uuidString资源的UUID,唯一标示该资源3.1.0
fiberChannelStorageUuidStringFC SAN存储UUID3.1.0
wwidString磁盘全局唯一表示3.1.0
vendorString供应商3.1.0
modelString型号3.1.0
wwnString磁盘WWN3.1.0
serialString磁盘序列号3.1.0
typeString磁盘类型3.1.0
pathString磁盘路径3.1.0
sizeLong磁盘大小3.1.0
createDateTimestamp创建时间3.1.0
lastOpDateTimestamp最后一次修改时间3.1.0
nameString资源名称3.1.0
stateString启用状态3.1.0
scsiLunHostRefsList详情参考scsiLunHostRefs3.1.0
scsiLunVmInstanceRefsList详情参考scsiLunVmInstanceRefs3.1.0

scsiLunHostRefs

名字类型描述起始版本
scsiLunUuidStringSCSI Lun UUID3.1.0
hostUuidString主机UUID3.1.0
createDateTimestamp创建时间3.1.0
lastOpDateTimestamp最后一次修改时间3.1.0

scsiLunVmInstanceRefs

名字类型描述起始版本
scsiLunUuidStringSCSI Lun UUID3.1.0
vmInstanceUuidString虚拟机UUID3.1.0
createDateTimestamp创建时间3.1.0
lastOpDateTimestamp最后一次修改时间3.1.0

SDK示例

Java SDK

QueryFiberChannelLunAction action = new QueryFiberChannelLunAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryFiberChannelLunAction.Result res = action.call();

Python SDK

QueryFiberChannelLunAction action = QueryFiberChannelLunAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryFiberChannelLunAction.Result res = action.call()