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) | 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: vdsUuid::{%s}vdsUuid::1234-5678SdnControllerVO.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 |
|---|---|---|---|
| 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 | |
| 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 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| startVni | Integer | 3.7.0 | |
| endVni | Integer | 3.7.0 |
| 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 |
| 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 |
| 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 |
| 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 |
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();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()GET zstack/v1/sdn-controllers GET zstack/v1/sdn-controllers/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X GET http://localhost:8080/zstack/v1/sdn-controllers?q=uuid=5e897e7e3a663786b873a3e020dbfc0acurl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X GET http://localhost:8080/zstack/v1/sdn-controllers/37c3e4f7602930c5888107528521ac90Queryable 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.
{ "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 |
| 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 | |
| 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 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| startVni | Integer | 3.7.0 | |
| endVni | Integer | 3.7.0 |
| 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 |
| 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 |
| 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 |
| 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 |
QuerySdnControllerAction action = new QuerySdnControllerAction(); action.conditions = asList("uuid=e9f330402ed03b32a865ac4f19890589"); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; QuerySdnControllerAction.Result res = action.call();QuerySdnControllerAction action = QuerySdnControllerAction() action.conditions = ["uuid=d6a1f2d694273d31bfd23736ab530e44"] action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" QuerySdnControllerAction.Result res = action.call()