Update SCSI LUN Configuration

PUT/zstack/v1/storage-devices/scsi-lun/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateScsiLun": {
    "name": "test-scsi-lun"
  },
  "systemTags": [],
  "userTags": []
}

In the example above, the systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateScsiLun":{"name":"test-scsi-lun"}}' http://localhost:8080/zstack/v1/storage-devices/scsi-lun/e2e9d7f44ee23960bc6e4e31b0a010d9/actions

Parameter List

Name

Type

Location

Description

Allowed Values

Starting Version

uuid

String

url

Resource UUID, uniquely identifies the resource

 

3.1.0

name (Optional)

String

body (contained in updateScsiLun structure)

Resource name

 

3.1.0

state (Optional)

String

body (contained in updateScsiLun structure)

Enabled state

  • Enabled
  • Disabled

3.1.0

systemTags (Optional)

List

body

 

 

3.1.0

userTags (Optional)

List

body

 

 

3.1.0

API Response

Response Example

{
  "inventory": {
    "name": "test-scsi-lun",
    "uuid": "57cefcdc1746340ba1649c446059aea0",
    "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": "57cefcdc1746340ba1649c446059aea0",
        "hostUuid": "6e76dfbcc3b338c482ff51de1f0d76da",
        "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
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. For details, see error3.1.0
inventoryScsiLunInventoryFor details, see inventory3.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

inventory

NameTypeDescriptionStarting Version
nameStringResource name3.1.0
uuidStringResource UUID, uniquely identifies the resource3.1.0
wwidStringDisk globally 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

SDK Examples

Java SDK

UpdateScsiLunAction action = new UpdateScsiLunAction();
action.uuid = "e2e9d7f44ee23960bc6e4e31b0a010d9";
action.name = "test-scsi-lun";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateScsiLunAction.Result res = action.call();

Python SDK

UpdateScsiLunAction action = UpdateScsiLunAction()
action.uuid = "e2e9d7f44ee23960bc6e4e31b0a010d9"
action.name = "test-scsi-lun"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateScsiLunAction.Result res = action.call()