Network ResourcesDistributed Switch Related Interfaces

UpdateVirtualSwitchUplinkGroup

PUT/zstack/v1/l2-networks/virtual-switch/{uuid}/uplink-group

Headers

Authorization: OAuth the-session-uuid

Body

{
  "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-group

Parameter List

Name

Type

Location

Description

Allowed Values

Starting Version

uuid

String

url

The resource UUID.

 

4.3.0

hostUuid

String

body(contained in updateVirtualSwitchUplinkGroup structure)

The host UUID.

 

4.3.0

slaveUuids (Optional)

List

body(contained in updateVirtualSwitchUplinkGroup structure)

Optional. The slave NIC UUID list.

 

4.3.0

slaveNames (Optional)

List

body(contained in updateVirtualSwitchUplinkGroup structure)

Optional. The slave NIC name list.

 

4.3.0

type (Optional)

String

body(contained in updateVirtualSwitchUplinkGroup structure)

Optional. The bonding type.

  • LinuxBonding
  • OvsBonding

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"
  }
}
NameTypeDescriptionStarting Version
successboolean 4.3.0
inventoryUplinkGroupInventorySee inventory.4.3.0
errorErrorCodeThe error code. If not null, the operation fails, or vice versa. For more information, see error.4.3.0

inventory

NameTypeDescriptionStarting Version
interfaceNameStringThe interface name.4.3.0
bondingUuidStringThe bonding UUID.4.3.0
interfaceUuidStringThe interface UUID.4.3.0
hostUuidStringThe host UUID.4.3.0
l2NetworkUuidStringThe Distributed Switch UUID.4.3.0
l2ProviderTypeStringThe Distributed Switch implementation type.4.3.0
bridgeNameStringThe bridge name.4.3.0
createDateTimestampThe creation date.4.3.0
lastOpDateTimestampThe last operation date.4.3.0
typeUplinkGroupTypeSee type.4.3.0

type

NameTypeDescriptionStarting Version
PhysicalInterfaceUplinkGroupTypePhysical NIC.4.3.0
BondingUplinkGroupTypeBonding.4.3.0

error

NameTypeDescriptionStarting Version
codeStringThe error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.0.6
descriptionStringThe brief description of the error.0.6
detailsStringThe details about the error.0.6
elaborationStringThe reserved field. Default value: null.0.6
opaqueLinkedHashMapThe reserved field. Default value: null.0.6
causeErrorCodeThe 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()