Query FC Storage 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 Example

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

Queryable Fields

Run the CLI command-line tool, enter QueryFiberChannelLun and press Tab to view all queryable fields and resource names that support cross-table queries.

API Response

Response Example

{
  "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
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See error for details3.1.0
inventoriesListSee inventories for details3.1.0

error

NameTypeDescriptionStarting Version
codeStringError code number. Globally unique identifier of the error, for example SYS.1000, HOST.1001.0.6
descriptionStringBrief error description0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, defaults to null0.6
opaqueLinkedHashMapReserved field, defaults to null0.6
causeErrorCodeRoot cause error. The error that caused the current error. If there is no original error, this field is null.0.6

inventories

NameTypeDescriptionStarting Version
uuidStringUUID of the resource. Uniquely identifies the resource.3.1.0
fiberChannelStorageUuidStringFC SAN Storage UUID3.1.0
wwidStringDisk globally unique identifier3.1.0
vendorStringVendor3.1.0
modelStringModel3.1.0
wwnStringDisk WWN3.1.0
serialStringDisk serial number3.1.0
typeStringDisk type3.1.0
pathStringDisk path3.1.0
sizeLongDisk size3.1.0
createDateTimestampCreate time3.1.0
lastOpDateTimestampLast update time3.1.0
nameStringResource name3.1.0
stateStringEnabled status3.1.0
scsiLunHostRefsListSee scsiLunHostRefs for details3.1.0
scsiLunVmInstanceRefsListSee scsiLunVmInstanceRefs for details3.1.0

scsiLunHostRefs

NameTypeDescriptionStarting Version
scsiLunUuidStringSCSI Lun UUID3.1.0
hostUuidStringHost UUID3.1.0
createDateTimestampCreate time3.1.0
lastOpDateTimestampLast update time3.1.0

scsiLunVmInstanceRefs

NameTypeDescriptionStarting Version
scsiLunUuidStringSCSI Lun UUID3.1.0
vmInstanceUuidStringVirtual Machine UUID3.1.0
createDateTimestampCreate time3.1.0
lastOpDateTimestampLast update time3.1.0

SDK Examples

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()