Query iSCSI Disk

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

Queryable Fields

Run the CLI command-line tool, enter QueryIscsiLun and press Tab to see all queryable fields and resource names that can be queried across tables.

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "d833304319da3b32bc92f21c763a8e5b",
      "wwid": "36b083fe000daf018000015505abbe00a",
      "vendor": "DELL",
      "model": "MD32xx",
      "wwn": "0x6b083fe000daf018",
      "serial": "6b083fe000daf018000015505abbe00a",
      "hctl": "6:0:1:1",
      "type": "mpath",
      "path": "ip-0.0.0.201:3260-iscsi-iqn.2018-01.io.cloud:tsn.00001-lun-0",
      "size": 30003188203520.0,
      "multipathDeviceUuid": "36b083fe000daf018000015505abbe00a"
    },
    {
      "uuid": "a21ee1e2e3f63a61ac983c53c29552d2",
      "wwid": "36b083fe000daf018000015505abbe00a",
      "vendor": "DELL",
      "model": "MD32xx",
      "wwn": "0x6b083fe000daf018",
      "serial": "6b083fe000daf018000015505abbe00a",
      "hctl": "6:0:3:1",
      "type": "mpath",
      "path": "ip-0.0.0.201:3260-iscsi-iqn.2018-01.io.cloud:tsn.00002-lun-0",
      "size": 30003188203520.0,
      "multipathDeviceUuid": "36b083fe000daf018000015505abbe00a"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. When the operation is successful, this field is null. For details, see error3.0.0
inventoriesListFor details, see inventories3.0.0

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.10013.0.0
descriptionStringBrief description of the error3.0.0
detailsStringDetailed error information3.0.0
elaborationStringReserved field, defaults to null3.0.0
opaqueLinkedHashMapReserved field, defaults to null3.0.0
causeErrorCodeRoot cause: the error that triggered the current error. If there is no original error, this field is null3.0.0

inventories

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource3.0.0
iscsiTargetUuidStringiSCSI Target UUID3.0.0
wwidStringUnique Identifier ID3.0.0
vendorStringDevice Vendor3.0.0
modelStringDevice Model3.0.0
wwnStringDevice WWN3.0.0
serialStringDevice Serial Number3.0.0
hctlStringSCSI Device HCTL3.0.0
typeStringDevice Type3.0.0
pathStringDevice Path3.0.0
sizeLongDevice Size3.0.0
createDateTimestampCreation Time3.0.0
lastOpDateTimestampLast Modification Time3.0.0

SDK Examples

Java SDK

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

Python SDK

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