Create Bare Metal NIC Bonding

POST/zstack/v1/baremetal/network/bondings

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "chassisUuid": "8a3fddc82d1536ad8f695d25d84404f2",
    "name": "bond0",
    "mode": 1,
    "slaves": "[\"d4:ae:52:6e:d1:0d\", \"d4:ae:52:6e:d1:0e\"]",
    "opts": "miimon=100"
  },
  "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 POST -d '{"params":{"chassisUuid":"8a3fddc82d1536ad8f695d25d84404f2","name":"bond0","mode":1,"slaves":"[\"d4:ae:52:6e:d1:0d\", \"d4:ae:52:6e:d1:0e\"]","opts":"miimon=100"}}' \
http://localhost:8080/zstack/v1/baremetal/network/bondings

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
chassisUuidStringbody (contained in params structure)Bare Metal Chassis UUID 3.4.0
nameStringbody (contained in params structure)NIC Bonding Name 3.4.0
modeIntegerbody (contained in params structure)NIC Bonding Mode 3.4.0
slavesStringbody (contained in params structure)NIC Bonding Slaves MAC Address 3.4.0
opts (Optional)Stringbody (contained in params structure)NIC Bonding Options 3.4.0
resourceUuid (Optional)Stringbody (contained in params structure)Resource UUID 3.4.0
systemTags (Optional)ListbodySystem Tags 3.4.0
userTags (Optional)ListbodyUser Tags 3.4.0
tagUuids (Optional)Listbody (contained in params structure)Tag UUID List 3.4.0

API Response

Response Example

{
  "inventory": {
    "uuid": "badccdb49c6e4ad599696948457f5277",
    "chassisUuid": "6442d12334e44aee96fc74c2fc8ea8f9",
    "name": "bond0",
    "mode": 1,
    "slaves": "[\"d4:ae:52:6e:d1:0d\", \"d4:ae:52:6e:d1:0e\"]",
    "opts": "miimon=100",
    "createDate": "Aug 15, 2025 5:32:54 AM",
    "lastOpDate": "Aug 15, 2025 5:32:54 AM"
  }
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeError code. If not null, the operation failed. When the operation succeeds, this field is null. See error for details.3.4.0
inventoryBaremetalBondingInventorySee inventory for details.3.4.0

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier for the error, for example 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 source error that caused the current error. If there is no original error, this field is null0.6

inventory

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource3.4.0
chassisUuidStringBare Metal Chassis UUID3.4.0
nameStringNIC Bonding Name3.4.0
modeIntegerNIC Bonding Mode3.4.0
slavesStringSlave MAC Address, comma separated3.4.0
optsStringNIC Bonding Options3.4.0
createDateTimestampCreate Time3.4.0
lastOpDateTimestampLast Modification Time3.4.0

SDK Examples

Java SDK

CreateBaremetalBondingAction action = new CreateBaremetalBondingAction();
action.chassisUuid = "8a3fddc82d1536ad8f695d25d84404f2";
action.name = "bond0";
action.mode = 1;
action.slaves = "["d4:ae:52:6e:d1:0d", "d4:ae:52:6e:d1:0e"]";
action.opts = "miimon=100";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateBaremetalBondingAction.Result res = action.call();

Python SDK

action = CreateBaremetalBondingAction()
action.chassisUuid = "8a3fddc82d1536ad8f695d25d84404f2"
action.name = "bond0"
action.mode = 1
action.slaves = "["d4:ae:52:6e:d1:0d", "d4:ae:52:6e:d1:0e"]"
action.opts = "miimon=100"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()