Get Scsi Lun Candidates For Attaching Vm

GET/zstack/v1/vm-instances/{vmInstanceUuid}/candidate-storage-devices

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/vm-instances/ccd1f4cb76e83c3b997fc4ed16ed529f/candidate-storage-devices?

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
vmInstanceUuidStringurlVirtual Machine UUID 3.1.0
systemTags (Optional)Listquery  3.1.0
userTags (Optional)Listquery  3.1.0

API Response

Response Example

{
  "inventories": [
    {
      "name": "fc-lun-36b083fe000daf018000022905ba35d8f",
      "uuid": "d4714249ba273a5c9d1c1cb3a1a16f24",
      "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": 1.0,
          "scsiLunUuid": "d4714249ba273a5c9d1c1cb3a1a16f24",
          "hostUuid": "c922c37f885e35aeb1ae87db3446fc7e",
          "createDate": "Nov 14, 2017 10:20:57 PM"
        }
      ],
      "scsiLunVmInstanceRefs": [],
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 3.1.0
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
errorErrorCodeFor details, see error3.1.0

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, for example SYS.1000, HOST.10013.1.0
descriptionStringBrief summary of the error3.1.0
detailsStringDetailed error information3.1.0
elaborationStringReserved field, defaults to null3.1.0
opaqueLinkedHashMapReserved field, defaults to null3.1.0
causeErrorCodeRoot cause: the source error that triggered the current error. If there is no original error, this field is null3.1.0

inventories

NameTypeDescriptionStarting Version
nameStringResource name3.1.0
uuidStringResource UUID, uniquely identifies the resource3.1.0
wwidStringDisk global unique identifier3.1.0
vendorStringDisk vendor3.1.0
modelStringDisk model3.1.0
wwnStringDisk WWN3.1.0
serialStringDisk serial number3.1.0
typeStringDisk type3.1.0
pathStringDisk path3.1.0
stateStringDisk enabled state3.1.0
sizeLongDisk size3.1.0
createDateTimestampCreation time3.1.0
lastOpDateTimestampLast modification time3.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

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, for example SYS.1000, HOST.10013.1.0
descriptionStringBrief summary of the error3.1.0
detailsStringDetailed error information3.1.0
elaborationStringReserved field, defaults to null3.1.0
opaqueLinkedHashMapReserved field, defaults to null3.1.0
causeErrorCodeRoot cause: the source error that triggered the current error. If there is no original error, this field is null3.1.0

SDK Examples

Java SDK

GetScsiLunCandidatesForAttachingVmAction action = new GetScsiLunCandidatesForAttachingVmAction();
action.vmInstanceUuid = "ccd1f4cb76e83c3b997fc4ed16ed529f";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetScsiLunCandidatesForAttachingVmAction.Result res = action.call();

Python SDK

GetScsiLunCandidatesForAttachingVmAction action = GetScsiLunCandidatesForAttachingVmAction()
action.vmInstanceUuid = "ccd1f4cb76e83c3b997fc4ed16ed529f"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetScsiLunCandidatesForAttachingVmAction.Result res = action.call()