UpdateBonding

API Request

URLs
PUT zstack/v1/hosts/bondings/{uuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "updateBonding": {
    "mode": "802.3ad",
    "xmitHashPolicy": "layer2+3"
  },
  "systemTags": [],
  "userTags": []
}
Note: In the above example, systemTags and userTags fields can be omitted. They are listed to indicate that these two fields can be included in the body.
Curl Example
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/actions
Parameter List
Name Type Location Description Allowed Values Starting Version
uuid String url Resource UUID, uniquely identifies the resource 4.7.0
slaveUuids (optional) List body (contained in updateBonding structure) Slave NIC UUID list 5.0.0
slaveNames (optional) List body (contained in updateBonding structure) Slave NIC name list 5.0.0
type (optional) String body (contained in updateBonding structure) Bond type
  • LinuxBonding
  • OvsBonding
4.7.0
mode (optional) String body (contained in updateBonding structure) Bond mode
  • 802.3ad
  • active-backup
4.7.0
xmitHashPolicy (optional) String body (contained in updateBonding structure) Hash policy
  • layer2
  • layer2+3
  • layer3+4
4.7.0
description (optional) String body (contained in updateBonding structure) Resource description 4.7.0
systemTags (optional) List body System tag 4.7.0
userTags (optional) List body User tag 4.7.0

API Response

On success, this API returns an empty JSON structure {}. On error, the returned JSON structure contains 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 Examples

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()
API Reference | ZStack ZSphere · ZVF | ZStack Resource Center