ZStack Cloud Platform
Single Server, Free Trial for One Year
POST zstack/v1/sdn-controllersAuthorization: OAuth the-session-uuid{ "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 -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| 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 | |
| zoneUuid | String | body (contained in the params structure) | Optional. The zone UUID. | 5.3.0 | |
| hostRefs | List | See hostRefs | 5.3.0 |
Note: vdsUuid::{%s}vdsUuid::1234-5678SdnControllerVO.classstartVlan::{%s}::endVlan::{%s}startVlan::110::endVlan::120SdnControllerVO.classstartVlan::{%s}::endVlan::{%s}startVlan::100::endVlan::200SdnControllerVO.class{ "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 |
| 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 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 3.7.0 |
| vendorType | String | 3.7.0 | |
| vendorVersion | String | The vendor version. | 5.4.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 |
| hostRefs | List | See host Refs. | 5.3.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| sdnControllerUuid | String | The SDN controller UUID. | 5.3.0 |
| hostUuid | String | The host UUID. | 5.3.0 |
| vSwitchType | String | The virtual switch type. | 5.3.0 |
| vtepIp | String | The VTEP IP. | 5.3.0 |
| nicPciAddresses | String | The NIC PCI address mapping. | 5.3.0 |
| nicDrivers | String | The NIC driver mapping. | 5.3.0 |
| netmask | String | The VTEP IP netmask. | 5.3.0 |
| bondMode | String | The NIC bond mode. | 5.3.0 |
| lacpMode | String | The NIC LACP mode. | 5.3.0 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| Connecting | SdnControllerStatus | Connecting. | 5.3.0 |
| Connected | SdnControllerStatus | Connected. | 5.3.0 |
| Disconnected | SdnControllerStatus | Disconnected. | 5.3.0 |
UpdateSdnControllerAction action = new UpdateSdnControllerAction(); action.uuid = "4a39301758b13cda968bdcd866452d14"; action.name = "Test-Net"; action.description = "Test"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; UpdateSdnControllerAction.Result res = action.call();UpdateSdnControllerAction action = UpdateSdnControllerAction() action.uuid = "4a39301758b13cda968bdcd866452d14" action.name = "Test-Net" action.description = "Test" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" UpdateSdnControllerAction.Result res = action.call()DELETE zstack/v1/sdn-controllers/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X DELETE http://localhost:8080/zstack/v1/sdn-controllers/237901c5097b38c480315569a1ac7567?deleteMode=Permissive| 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 |
{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }RemoveSdnControllerAction action = new RemoveSdnControllerAction(); action.uuid = "237901c5097b38c480315569a1ac7567"; action.deleteMode = "Permissive"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; RemoveSdnControllerAction.Result res = action.call();RemoveSdnControllerAction action = RemoveSdnControllerAction() action.uuid = "237901c5097b38c480315569a1ac7567" action.deleteMode = "Permissive" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" RemoveSdnControllerAction.Result res = action.call()