UpdateVirtualSwitchUplinkGroup
Headers
Authorization: OAuth the-session-uuidBody
{
"updateVirtualSwitchUplinkGroup": {
"hostUuid": "922a7e4c781638ddb37d2098540530d8",
"slaveNames": [
"eth0"
],
"type": "LinuxBonding"
},
"systemTags": [],
"userTags": []
}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 '{"updateVirtualSwitchUplinkGroup":{"hostUuid":"922a7e4c781638ddb37d2098540530d8","slaveNames":["eth0"],"type":"LinuxBonding"}}' \
http://localhost:8080/zstack/v1/l2-networks/virtual-switch/6614ce3ef02330cf8fcc734edd07da58/uplink-groupParameter List
Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
uuid | String | url | The resource UUID. |
| 4.3.0 |
hostUuid | String | body(contained in | The host UUID. |
| 4.3.0 |
slaveUuids (Optional) | List | body(contained in | Optional. The slave NIC UUID list. |
| 4.3.0 |
slaveNames (Optional) | List | body(contained in | Optional. The slave NIC name list. |
| 4.3.0 |
type (Optional) | String | body(contained in | Optional. The bonding type. |
| 4.3.0 |
systemTags (Optional) | List | body | Optional. The system tags. |
| 4.3.0 |
userTags (Optional) | List | body | Optional. The user tags. |
| 4.3.0 |
API Response
Sample Response
{
"inventory": {
"interfaceName": "eth0",
"type": "PhysicalInterface",
"interfaceUuid": "5d98a3ee3da1373e87b5f559c43da1e7",
"hostUuid": "ec5f7039252633748d29cb55ebcca73c",
"l2NetworkUuid": "d3357c017b793f21b6ec9e36f6f163e5"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 4.3.0 | |
| inventory | UplinkGroupInventory | See inventory. | 4.3.0 |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 4.3.0 |
inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| interfaceName | String | The interface name. | 4.3.0 |
| bondingUuid | String | The bonding UUID. | 4.3.0 |
| interfaceUuid | String | The interface UUID. | 4.3.0 |
| hostUuid | String | The host UUID. | 4.3.0 |
| l2NetworkUuid | String | The Distributed Switch UUID. | 4.3.0 |
| l2ProviderType | String | The Distributed Switch implementation type. | 4.3.0 |
| bridgeName | String | The bridge name. | 4.3.0 |
| createDate | Timestamp | The creation date. | 4.3.0 |
| lastOpDate | Timestamp | The last operation date. | 4.3.0 |
| type | UplinkGroupType | See type. | 4.3.0 |
type
| Name | Type | Description | Starting Version |
|---|---|---|---|
| PhysicalInterface | UplinkGroupType | Physical NIC. | 4.3.0 |
| Bonding | UplinkGroupType | Bonding. | 4.3.0 |
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. | 0.6 |
| description | String | The brief description of the error. | 0.6 |
| details | String | The details about the error. | 0.6 |
| elaboration | String | The reserved field. Default value: null. | 0.6 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
SDK Sample
Java SDK
UpdateVirtualSwitchUplinkGroupAction action = new UpdateVirtualSwitchUplinkGroupAction();
action.uuid = "6614ce3ef02330cf8fcc734edd07da58";
action.hostUuid = "922a7e4c781638ddb37d2098540530d8";
action.slaveNames = asList("eth0");
action.type = "LinuxBonding";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateVirtualSwitchUplinkGroupAction.Result res = action.call();Python SDK
UpdateVirtualSwitchUplinkGroupAction action = UpdateVirtualSwitchUplinkGroupAction()
action.uuid = "6614ce3ef02330cf8fcc734edd07da58"
action.hostUuid = "922a7e4c781638ddb37d2098540530d8"
action.slaveNames = [eth0]
action.type = "LinuxBonding"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateVirtualSwitchUplinkGroupAction.Result res = action.call()