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) 3.7.0
password String body (contained in the params structure) 3.7.0
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
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
vniRanges List See vniRanges. 3.7.0
vxlanPools List See vxlanPools. 3.7.0
#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
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
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 3.7.0
port Integer 3.7.0
type String 3.7.0
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
poolUuid String 3.7.0
#attachedVxlanNetworkRefs
Name Type Description Starting Version
vni Integer 3.7.0
poolUuid String 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
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
attachedClusterUuids List 3.7.0
#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 3.7.0
endVni Integer 3.7.0
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

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()

QuerySdnController

API Request

URLs
GET zstack/v1/sdn-controllers GET 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 GET http://localhost:8080/zstack/v1/sdn-controllers?q=uuid=5e897e7e3a663786b873a3e020dbfc0a
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X GET http://localhost:8080/zstack/v1/sdn-controllers/37c3e4f7602930c5888107528521ac90

Queryable Fields

You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QuerySdnController, and pressing the Tab key.

API Response

Sample Response
{   "inventories": [     {       "uuid": "b4134eb269a632eda5df826686733c5e",       "name": "test-sdn",       "description": "sdn for test",       "ip": "192.168.1.1",       "username": "admin",       "password": "password"     }   ] }
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.7.0
inventories List See inventories. 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
#inventories
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
vniRanges List See vniRanges. 3.7.0
vxlanPools List See vxlanPools. 3.7.0
#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
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
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 3.7.0
port Integer 3.7.0
type String 3.7.0
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
poolUuid String 3.7.0
#attachedVxlanNetworkRefs
Name Type Description Starting Version
vni Integer 3.7.0
poolUuid String 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
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
attachedClusterUuids List 3.7.0
#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 3.7.0
endVni Integer 3.7.0
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

SDK Sample

Java SDK
QuerySdnControllerAction action = new QuerySdnControllerAction(); action.conditions = asList("uuid=e9f330402ed03b32a865ac4f19890589"); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; QuerySdnControllerAction.Result res = action.call();
Python SDK
QuerySdnControllerAction action = QuerySdnControllerAction() action.conditions = ["uuid=d6a1f2d694273d31bfd23736ab530e44"] action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" QuerySdnControllerAction.Result res = action.call()








































































































































Archives

Download Document Archives

Back to Top

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.