UpdateBonding
API Request
URLs
PUT zstack/v1/hosts/bondings/{uuid}/actionsHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"updateBonding": {
"mode": "802.3ad",
"xmitHashPolicy": "layer2+3"
},
"systemTags": [],
"userTags": []
}
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateBonding":{"mode":"802.3ad","xmitHashPolicy":"layer2+3"}}' http://localhost:8080/zstack/v1/hosts/bondings/1facb0c5125037a5bc4167cd2ad30d1f/actionsRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The resource UUID. | 4.7.0 | |
| slaveUuids | List | body (contained in the updateBonding structure) | Optional. The slave NIC UUIDs. | 4.7.0 | |
| type | String | body (contained in the updateBonding structure) | Optional. The bond type. |
|
4.7.0 |
| mode | String | body (contained in the updateBonding structure) | Optional. The bond mode. |
|
4.7.0 |
| xmitHashPolicy | String | body (contained in the updateBonding structure) | Optional. The hash policy. |
|
4.7.0 |
| description | String | body (contained in the updateBonding structure) | Optional. The resource description. | 4.7.0 | |
| systemTags | List | body | Optional. The system tags. | 4.7.0 | |
| userTags | List | body | Optional. The user tags. | 4.7.0 |
API Response
When the API succeeded, an empty JSON structure {} is returned. When the API
failed, the returned JSON structure includes an error field. For
example,
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}SDK Sample
Java
SDK
UpdateBondingAction action = new UpdateBondingAction();
action.uuid = "1facb0c5125037a5bc4167cd2ad30d1f";
action.mode = "802.3ad";
action.xmitHashPolicy = "layer2+3";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateBondingAction.Result res = action.call();Python
SDK
UpdateBondingAction action = UpdateBondingAction()
action.uuid = "1facb0c5125037a5bc4167cd2ad30d1f"
action.mode = "802.3ad"
action.xmitHashPolicy = "layer2+3"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateBondingAction.Result res = action.call()