Network Resource


AddSdnController

API Request

URLs
POST zstack/v1/sdn-controllers
Headers
Authorization: OAuth the-session-uuid
Body
{   "params": {     "vendorType": "vendor",     "name": "sdn-1",     "description": "sdn controller from vendor",     "ip": "192.168.1.1",     "userName": "admin",     "password": "password"   },   "systemTags": [],   "userTags": [] }
Note: 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 POST -d '{"params":{"vendorType":"vendor","name":"sdn-1","description":"sdn controller from vendor","ip":"192.168.1.1","userName":"admin","password":"password"}}' http://localhost:8080/zstack/v1/sdn-controllers
Request Parameters
Name Type Location Description Optional Value Starting Version
vendorType String body (contained in the params structure) 3.7.0
name String body (contained in the params structure) The resource name. 3.7.0
description String body (contained in the params structure) Optional. The detailed description of the resource. 3.7.0
ip String body (contained in the params structure) 3.7.0
userName String body (contained in the params structure) Optional. The user name. 5.3.20
password String body (contained in the params structure) Optional. The password. 5.3.20
resourceUuid String body (contained in the params structure) Optional. The resource UUID. 3.7.0
tagUuids List body (contained in the params structure) Optional. The tag UUID list. 3.7.0
systemTags List body Optional. The system tags. 3.7.0
userTags List body Optional. The user tags. 3.7.0
Note:
  • When you add an SDN controller in ZStack Cloud, you can create an H3C SDN controller by adding the H3C_VDS_UUID option to SystemTags. The SystemTag is passed by using the vdsUuid parameter.
    • Format of the H3C_VDS_UUID option: vdsUuid::{%s}
    • Example: vdsUuid::1234-5678
    • Associated resource: SdnControllerVO.class

API Response

Sample Response
{   "inventory": {     "uuid": "2f7e443a152833efb0f4b7d196a35ce0",     "vendorType": "H3C VCFC",     "name": "sdn-1",     "description": "sdn controller from vendor",     "ip": "192.168.1.1",     "username": "admin",     "password": "password"   } }
Name Type Description Starting Version
success Boolean 5.3.20
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.7.0
inventory SdnControllerInventory See inventory. 3.7.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. 3.7.0
description String The brief description of the error. 3.7.0
details String The details about the error. 3.7.0
elaboration String The reserved field. Default value: null. 3.7.0
opaque LinkedHashMap The reserved field. Default value: null. 3.7.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.7.0
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 3.7.0
vendorType String 3.7.0
name String The resource name. 3.7.0
description String The detailed description of the resource. 3.7.0
ip String 3.7.0
username String 3.7.0
password String 3.7.0
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
status SdnControllerStatus See status. 5.3.20
vniRanges List See vniRanges. 3.7.0
vxlanPools List See vxlanPools. 3.7.0
hostRefs List See hostRefs. 5.3.20
#status
Name Type Description Starting Version
Connecting SdnControllerStatus Connecting. 5.3.20
Connected SdnControllerStatus Connected. 5.3.20
Disconnected SdnControllerStatus Disconnected. 5.3.20
#vniRanges
Name Type Description Starting Version
startVni Integer 3.7.0
endVni Integer 3.7.0
#vxlanPools
Name Type Description Starting Version
sdnControllerUuid String 3.7.0
attachedCidrs Map 3.7.0
uuid String The resource UUID. 3.7.0
name String The resource name. 3.7.0
description String The detailed description of the resource. 3.7.0
zoneUuid String The zone UUID. 3.7.0
physicalInterface String 3.7.0
type String 3.7.0
vSwitchType String 5.3.20
virtualNetworkId Integer 5.3.20
isolated Boolean 5.3.20
pvlan String 5.3.20
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
attachedClusterUuids List 3.7.0
attachedVtepRefs List See attachedVtepRefs. 3.7.0
remoteVteps List See remoteVteps 5.3.20
attachedVxlanNetworkRefs List See attachedVxlanNetworkRefs. 3.7.0
attachedVniRanges List See attachedVniRanges. 3.7.0
#attachedVtepRefs
Name Type Description Starting Version
uuid String The resource UUID. 3.7.0
hostUuid String The host UUID. 3.7.0
vtepIp String The VXLAN tunnel endponit (VTEP) IP. 5.3.20
port Integer The port number. 5.3.20
type String The type. 5.3.20
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
poolUuid String 3.7.0
#remoteVteps
Name Type Description Starting Version
uuid String The resource UUID. 5.3.20
clusterUuid String The cluster UUID 5.3.20
vtepIp String The VXLAN tunnel endpoint (VTEP) IP. 5.3.20
port Integer The port number. 5.3.20
type String The type. 5.3.20
createDate Timestamp The creation date. 5.3.20
lastOpDate Timestamp The last operation date. 5.3.20
poolUuid String The VXLAN pool UUID. 5.3.20
#attachedVxlanNetworkRefs
Name Type Description Starting Version
vni Integer The VNI number. 5.3.20
poolUuid String The VXLAN pool UUID. 5.3.20
uuid String The resource UUID. 3.7.0
name String The resource name. 3.7.0
description String The detailed description of the resource. 3.7.0
zoneUuid String The zone UUID. 3.7.0
physicalInterface String 3.7.0
type String 3.7.0
vSwitchType String 5.3.20
virtualNetworkId Integer 5.3.20
isolated Boolean 5.3.20
pvlan String 5.3.20
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
attachedClusterUuids List The attached cluster UUID. 5.3.20
#attachedVniRanges
Name Type Description Starting Version
uuid String The resource UUID. 3.7.0
name String The resource name. 3.7.0
description String The detailed description of the resource. 3.7.0
startVni Integer The start VNI. 5.3.20
endVni Integer The end VNI. 5.3.20
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
l2NetworkUuid String The L2 network UUID. 3.7.0
#hostRefs
Name Type Description Starting Version
sdnControllerUuid String The SDN controller UUID. 5.3.20
hostUuid String The host UUID. 5.3.20
vSwitchType String The virtual switch type. 5.3.20
vtepIp String The VXLAN tunnel endpoint (VTEP) IP. 5.3.20
nicPciAddresses String The NIC and PCI address mapping. 5.3.20
nicDrivers String The NIC and driver type mapping. 5.3.20
netmask String The host VTEP IP netmask. 5.3.20
bondMode String The NIC bond mode. 5.3.20
lacpMode String The NIC LACP mode. 5.3.20

SDK Sample

Java SDK
AddSdnControllerAction action = new AddSdnControllerAction(); action.vendorType = "vendor"; action.name = "sdn-1"; action.description = "sdn controller from vendor"; action.ip = "192.168.1.1"; action.userName = "admin"; action.password = "password"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; AddSdnControllerAction.Result res = action.call();
Python SDK
AddSdnControllerAction action = AddSdnControllerAction() action.vendorType = "vendor" action.name = "sdn-1" action.description = "sdn controller from vendor" action.ip = "192.168.1.1" action.userName = "admin" action.password = "password" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" AddSdnControllerAction.Result res = action.call()

RemoveSdnController

API Request

URLs
DELETE zstack/v1/sdn-controllers/{uuid}
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/sdn-controllers/237901c5097b38c480315569a1ac7567?deleteMode=Permissive
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 3.7.0
deleteMode String body Optional. The delete mode. 3.7.0
systemTags List body Optional. The system tags. 3.7.0
userTags List body Optional. The user tags. 3.7.0

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,
{ 	"error": { 		"code": "SYS.1001", 		"description": "A message or a operation timeout", 		"details": "Create VM on KVM timeout after 300s" 	} }

SDK Sample

Java SDK
RemoveSdnControllerAction action = new RemoveSdnControllerAction(); action.uuid = "237901c5097b38c480315569a1ac7567"; action.deleteMode = "Permissive"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; RemoveSdnControllerAction.Result res = action.call();
Python SDK
RemoveSdnControllerAction action = RemoveSdnControllerAction() action.uuid = "237901c5097b38c480315569a1ac7567" action.deleteMode = "Permissive" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" RemoveSdnControllerAction.Result res = action.call()














































































































































Archives

Download Document Archives

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.