CreateBareMetal2Bonding

API Requests

URLs
POST /v1/baremetal2/chassis/bond
Headers
Authorization: OAuth the-session-uuid
Body
{
  "params": {
    "chassisUuid": "a4fbbe7091973f5b94232054883f5237",
    "name": "bond0",
    "mode": 1.0,
    "slaves": "40:8d:5c:f7:8d:68,40:8d:5c:f7:8d:69"
  },
  "systemTags": [],
  "userTags": []
}
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Samples
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"chassisUuid":"a4fbbe7091973f5b94232054883f5237","name":"bond0","mode":1.0,"slaves":"40:8d:5c:f7:8d:68,40:8d:5c:f7:8d:69"}}' http://localhost:8080/zstack/v1/baremetal2/chassis/bond
Request Parameters
Name Type Location Description Valid Value Starting Version
chassisUuid String body (contained in the params structure) 4.4.24
name String body (contained in the params structure) The resource name. 4.4.24
mode Integer body (contained in the params structure) 4.4.24
slaves String body (contained in the params structure) 4.4.24
opts String body (contained in the params structure) Optional. 4.4.24
systemTags List body Optional. The system tags. 4.4.24
userTags List body Optional. The user tags. 4.4.24

API Response

Sample Response
{
  "inventory": {
    "chassisUuid": "f4eab1389d2a4cf49c8dfef456480c5a",
    "name": "bond0",
    "slaves": "40:8d:5c:f7:8d:60,40:8d:5c:f7:8d:61",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM",
    "uuid": "d5090788c5624c039857ddbd32467234"
  }
}
Name Type Description Starting Version
success boolean 4.4.24
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error 4.4.24
inventory BareMetal2BondingInventory See inventory 4.4.24
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 4.4.24
description String The brief description of the error. 4.4.24
details String The details about the error. 4.4.24
elaboration String The reserved field. Default value: null. 4.4.24
opaque LinkedHashMap The reserved field. Default value: null. 4.4.24
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 4.4.24
#inventory
Name Type Description Starting Version
chassisUuid String 4.4.24
name String The resource name. 4.4.24
slaves String 4.4.24
opts String 4.4.24
mode Integer 4.4.24
createDate Timestamp The creation date. 4.4.24
lastOpDate Timestamp The last operation date. 4.4.24
accountUuid String The account UUID. 4.4.24
uuid String The resource UUID. 4.4.24

SDK Sample

Java SDK
CreateBareMetal2BondingAction action = new CreateBareMetal2BondingAction();
action.chassisUuid = "a4fbbe7091973f5b94232054883f5237";
action.name = "bond0";
action.mode = 1.0;
action.slaves = "40:8d:5c:f7:8d:68,40:8d:5c:f7:8d:69";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateBareMetal2BondingAction.Result res = action.call();
Python SDK
CreateBareMetal2BondingAction action = CreateBareMetal2BondingAction()
action.chassisUuid = "a4fbbe7091973f5b94232054883f5237"
action.name = "bond0"
action.mode = 1.0
action.slaves = "40:8d:5c:f7:8d:68,40:8d:5c:f7:8d:69"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateBareMetal2BondingAction.Result res = action.call()