Query FC SAN Storage

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

Queryable Fields

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

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "afedd6ab89d338fbaab258f981ca2295",
      "state": "Enabled",
      "fiberChannelLuns": [
        {
          "fiberChannelStorageUuid": "afedd6ab89d338fbaab258f981ca2295",
          "name": "fc-lun-36b083fe000daf018000022905ba35d8f",
          "uuid": "2e69f8443fbc3ec3a25a92ab8632f80f",
          "wwid": "36b083fe000daf018000022905ba35d8f",
          "vendor": "DELL",
          "model": "MD32xx",
          "wwn": "0x6f01faf000d5c3e7",
          "serial": "6b083fe000daf018000015505abbe00a",
          "type": "mpath",
          "path": "pci-0000:05:00.0-fc-0x2012b083fedaf018-lun-11",
          "size": 5497558138880.0,
          "scsiLunHostRefs": [
            {
              "id": 3.0,
              "scsiLunUuid": "5a89fbd0d7793673acfa2e69acc56ce4",
              "hostUuid": "bc3f69d449aa3410bd7267a1050de980",
              "createDate": "Nov 14, 2017 10:20:57 PM",
              "lastOpDate": "Nov 14, 2017 10:20:57 PM"
            }
          ],
          "scsiLunVmInstanceRefs": []
        },
        {
          "fiberChannelStorageUuid": "afedd6ab89d338fbaab258f981ca2295",
          "name": "fc-lun-36f01faf000d5c3e7000023ef5ba362f2",
          "uuid": "52039a86c9173ff7a86ce214fc3d47cf",
          "wwid": "36f01faf000d5c3e7000023ef5ba362f2",
          "vendor": "DELL",
          "model": "MD32xx",
          "wwn": "0x6b083fe000daf018",
          "serial": "6b083fe000daf018000015505abbe00a",
          "type": "mpath",
          "path": "pci-0000:05:00.0-fc-0x2012b083fedaf018-lun-12",
          "size": 5497558138880.0,
          "scsiLunHostRefs": [
            {
              "id": 3.0,
              "scsiLunUuid": "5a89fbd0d7793673acfa2e69acc56ce4",
              "hostUuid": "bc3f69d449aa3410bd7267a1050de980",
              "createDate": "Nov 14, 2017 10:20:57 PM",
              "lastOpDate": "Nov 14, 2017 10:20:57 PM"
            }
          ],
          "scsiLunVmInstanceRefs": []
        }
      ],
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    },
    {
      "uuid": "4e902db710403f68a7703e45d00e551d",
      "state": "Enabled",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. For details, see error3.1.0
inventoriesListFor details, see inventories3.1.0

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, e.g. SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, defaults to null0.6
opaqueLinkedHashMapReserved field, defaults to null0.6
causeErrorCodeRoot cause. The error that caused the current error. If there is no original error, this field is null0.6

inventories

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource3.1.0
nameStringResource name3.1.0
wwnnStringFC SAN globally unique identifier3.1.0
stateStringEnabled state3.1.0
createDateTimestampCreation time3.1.0
lastOpDateTimestampLast modification time3.1.0
fiberChannelLunsListFor details, see fiberChannelLuns3.1.0

fiberChannelLuns

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource3.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
createDateTimestampCreation time3.1.0
lastOpDateTimestampLast modification time3.1.0
nameStringResource name3.1.0
stateStringEnabled state3.1.0
scsiLunHostRefsListFor details, see scsiLunHostRefs3.1.0
scsiLunVmInstanceRefsListFor details, see scsiLunVmInstanceRefs3.1.0

scsiLunHostRefs

NameTypeDescriptionStarting Version
scsiLunUuidStringSCSI LUN UUID3.1.0
hostUuidStringHost UUID3.1.0
createDateTimestampCreation time3.1.0
lastOpDateTimestampLast modification time3.1.0

scsiLunVmInstanceRefs

NameTypeDescriptionStarting Version
scsiLunUuidStringSCSI LUN UUID3.1.0
vmInstanceUuidStringVirtual Machine UUID3.1.0
createDateTimestampCreation time3.1.0
lastOpDateTimestampLast modification time3.1.0

SDK Examples

Java SDK

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

Python SDK

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