Network ResourcesDistributed Switch Related Interfaces

DetachL2NetworkFromCluster

API Request

URLs

DELETE/v1/l2-networks/{l2NetworkUuid}/clusters/{clusterUuid}

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/l2-networks/baef7db345553050846947bb2d818be0/clusters/2fb51e7e35d339c4bac77819a9c4fea1?

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
l2NetworkUuidStringurlThe port group Distributed Switch UUID. 0.6
clusterUuidStringurlThe cluster UUID. 0.6
systemTags (Optional)ListbodyOptional. The system tags. 0.6
userTags (Optional)ListbodyOptional. The user tags. 0.6

API Response

Sample Response

{
  "inventory": {
    "vlan": 10,
    "name": "Test-Net",
    "description": "Test",
    "zoneUuid": "7a531508c19d396d84abeda34b83d946",
    "physicalInterface": "eth0",
    "type": "L2VlanNetwork"
  }
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeThe error code. If not null, the operation fails, or vice versa. For more information, see error.0.6
inventoryL2NetworkInventorySee inventory.0.6

error

NameTypeDescriptionStarting Version
codeStringThe error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.4.8.0
descriptionStringThe brief description of the error.4.8.0
detailsStringThe details about the error.4.8.0
elaborationStringThe reserved field. Default value: null.4.8.0
opaqueLinkedHashMapThe reserved field. Default value: null.4.8.0
causeErrorCodeThe root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.4.8.0

inventory

NameTypeDescriptionStarting Version
uuidStringThe resource UUID.4.8.0
nameStringThe resource name.4.8.0
descriptionStringThe detailed description of the resource.4.8.0
zoneUuidStringThe Data Center UUID.4.8.0
physicalInterfaceStringThe physical NIC.4.8.0
typeStringThe Distributed Switch type.4.8.0
createDateTimestampThe creation date.4.8.0
lastOpDateTimestampThe last operation date.4.8.0
attachedClusterUuidsList 4.8.0

SDK Sample

Java SDK

DetachL2NetworkFromClusterAction action = new DetachL2NetworkFromClusterAction();
action.l2NetworkUuid = "baef7db345553050846947bb2d818be0";
action.clusterUuid = "2fb51e7e35d339c4bac77819a9c4fea1";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DetachL2NetworkFromClusterAction.Result res = action.call();

Python SDK

DetachL2NetworkFromClusterAction action = DetachL2NetworkFromClusterAction()
action.l2NetworkUuid = "baef7db345553050846947bb2d818be0"
action.clusterUuid = "2fb51e7e35d339c4bac77819a9c4fea1"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DetachL2NetworkFromClusterAction.Result res = action.call()