Update iSCSI Server Configuration

POST/zstack/v1/storage-devices/iscsi/servers

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateIscsiServer": {
    "name": "test-iscsi-server"
  },
  "systemTags": [],
  "userTags": []
}

In the example above, 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 '{"updateIscsiServer":{"name":"test-iscsi-server"}}' http://localhost:8080/zstack/v1/storage-devices/iscsi/servers/98d2177199ca301d9fd842eace2dbc67/actions

Parameter List

Name

Type

Location

Description

Allowed Values

Starting Version

uuid

String

body (included in the params structure)

Resource UUID, uniquely identifies the resource

 

3.0.0

name (optional)

String

body (included in the params structure)

Resource Name

 

3.0.0

chapUserName (optional)

String

body (included in the params structure)

CHAP Username

 

3.0.0

chapUserPassword (optional)

String

body (included in the params structure)

CHAP Password

 

3.0.0

state (optional)

String

body (included in the params structure)

Enabled State

  • Enabled
  • Disabled

3.0.0

resourceUuid (optional)

String

body (included in the params structure)

 

 

3.0.0

systemTags (optional)

List

body

 

 

3.0.0

userTags (optional)

List

body

 

 

3.0.0

API Response

Response Example

{
  "inventory": {
    "uuid": "0b77c2e947ca3b40b79f6342728ec8fc",
    "name": "iscsi-server-10.0.0.201",
    "ip": "10.0.0.201",
    "port": 3260.0,
    "chapUserName": "username",
    "chapUserPassword": "password",
    "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. When the operation is successful, this field is null. For details, see error3.0.0
inventoryIscsiServerInventoryFor details, see inventory3.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

inventory

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource3.0.0
nameStringResource Name3.0.0
ipStringIP Address3.0.0
portIntegerPort3.0.0
chapUserNameStringCHAP Username3.0.0
chapUserPasswordStringCHAP Password3.0.0
stateStringEnabled State3.0.0
createDateTimestampCreation Time3.0.0
lastOpDateTimestampLast Modification Time3.0.0
iscsiTargetsListFor details, see iscsiTargets3.0.0
iscsiClusterRefsListFor details, see iscsiClusterRefs3.0.0

iscsiTargets

NameTypeDescriptionStarting Version
iscsiServerUuidStringiSCSI Server UUID3.0.0
uuidStringResource UUID, uniquely identifies the resource3.0.0
iqnStringiSCSI IQN3.0.0
createDateTimestampCreation Time3.0.0
lastOpDateTimestampLast Modification Time3.0.0
iscsiLunsListFor details, see iscsiLuns3.0.0

iscsiLuns

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

iscsiClusterRefs

NameTypeDescriptionStarting Version
iscsiServerUuidString 3.0.0
clusterUuidStringCluster UUID3.0.0
createDateTimestampCreation Time3.0.0
lastOpDateTimestampLast Modification Time3.0.0

SDK Examples

Java SDK

UpdateIscsiServerAction action = new UpdateIscsiServerAction();
action.uuid = "98d2177199ca301d9fd842eace2dbc67";
action.name = "test-iscsi-server";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateIscsiServerAction.Result res = action.call();

Python SDK

UpdateIscsiServerAction action = UpdateIscsiServerAction()
action.uuid = "98d2177199ca301d9fd842eace2dbc67"
action.name = "test-iscsi-server"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateIscsiServerAction.Result res = action.call()