Update iSCSI Server Configuration
Headers
Authorization: OAuth the-session-uuidBody
{
"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/actionsParameter 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 |
| 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"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. When the operation is successful, this field is null. For details, see error | 3.0.0 |
| inventory | IscsiServerInventory | For details, see inventory | 3.0.0 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, e.g. SYS.1000, HOST.1001 | 3.0.0 |
| description | String | Brief description of the error | 3.0.0 |
| details | String | Detailed error information | 3.0.0 |
| elaboration | String | Reserved field, defaults to null | 3.0.0 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 3.0.0 |
| cause | ErrorCode | Root cause: the error that triggered the current error. If there is no original error, this field is null | 3.0.0 |
inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| name | String | Resource Name | 3.0.0 |
| ip | String | IP Address | 3.0.0 |
| port | Integer | Port | 3.0.0 |
| chapUserName | String | CHAP Username | 3.0.0 |
| chapUserPassword | String | CHAP Password | 3.0.0 |
| state | String | Enabled State | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiTargets | List | For details, see iscsiTargets | 3.0.0 |
| iscsiClusterRefs | List | For details, see iscsiClusterRefs | 3.0.0 |
iscsiTargets
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | iSCSI Server UUID | 3.0.0 |
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iqn | String | iSCSI IQN | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
| iscsiLuns | List | For details, see iscsiLuns | 3.0.0 |
iscsiLuns
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 3.0.0 |
| iscsiTargetUuid | String | iSCSI Target UUID | 3.0.0 |
| wwid | String | Unique Identifier ID | 3.0.0 |
| vendor | String | Device Vendor | 3.0.0 |
| model | String | Device Model | 3.0.0 |
| wwn | String | Device WWN | 3.0.0 |
| serial | String | Device Serial Number | 3.0.0 |
| hctl | String | SCSI Device HCTL | 3.0.0 |
| type | String | Device Type | 3.0.0 |
| path | String | Device Path | 3.0.0 |
| size | Long | Device Size | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.0.0 |
iscsiClusterRefs
| Name | Type | Description | Starting Version |
|---|---|---|---|
| iscsiServerUuid | String | 3.0.0 | |
| clusterUuid | String | Cluster UUID | 3.0.0 |
| createDate | Timestamp | Creation Time | 3.0.0 |
| lastOpDate | Timestamp | Last Modification Time | 3.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()