Document navigation

Hardware SDN Controller Operations

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
zoneUuid String body (contained in the params structure) Optional. The zone UUID. 5.3.0
hostRefs List See hostRefs 5.3.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
  • When you add a Huawei SDN controller in ZStack Cloud, you can record the VLAN range used by the SDN controller by adding startVlan::endVlan options to SystemTags.
    • Format: startVlan::{%s}::endVlan::{%s}
    • Example: startVlan::110::endVlan::120
    • Associated resource: SdnControllerVO.class
  • When you add an H3C v1 SDN controller in ZStack Cloud, you can record the Vni range used by the SDN controller by adding startVni::endVni options to SystemTags.
    • Format: startVlan::{%s}::endVlan::{%s}
    • Example: startVlan::100::endVlan::200
    • 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
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
#hostRefs
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
#status
Name Type Description Starting Version
Connecting SdnControllerStatus Connecting. 5.3.0
Connected SdnControllerStatus Connected. 5.3.0
Disconnected SdnControllerStatus Disconnected. 5.3.0

SDK Sample

Java SDK
UpdateSdnControllerAction action = new UpdateSdnControllerAction();
action.uuid = "4a39301758b13cda968bdcd866452d14";
action.name = "Test-Net";
action.description = "Test";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateSdnControllerAction.Result res = action.call();
Python SDK
UpdateSdnControllerAction action = UpdateSdnControllerAction()
action.uuid = "4a39301758b13cda968bdcd866452d14"
action.name = "Test-Net"
action.description = "Test"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateSdnControllerAction.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()

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
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
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
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 hostRefs. 5.3.0
#hostRefs
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
#status
Name Type Description Starting Version
Connecting SdnControllerStatus Connecting. 5.3.20
Connected SdnControllerStatus Connected. 5.3.20
Disconnected SdnControllerStatus Disconnected. 5.3.20

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

ChangeSdnController

API Request

URLs
PUT zstack/v1/sdn-controllers/{uuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "changeSdnController": {
    "userName": "sdnuser",
    "password": "newpassword"
  },
  "systemTags": [],
  "userTags": []
}
Note: In the proceding sample, both systemTagsand 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 PUT -d '{"changeSdnController":{"userName":"sdnuser","password":"newpassword"}}' http://localhost:8080/zstack/v1/sdn-controllers/fde0b2acbe6c3c7192e32d113f4e00b8/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The UUID of the SDN controller resource. 5.4.0
userName String body(contained in the changeSdnControllerstructure) Optional. New user name for the SDN controller. 5.4.0
password String body(contained in the changeSdnControllerstructure) Optional. The new password for the SDN controller. 5.4.0
systemTags List body Optional. The system tags. 5.4.0
userTags List body Optional. The user tags. 5.4.0
vlanRanges List body(contained in the changeSdnControllerstructure) 5.4.0
Note:
  • When you create a Layer 3 network in ZStack Cloud, you can specify the port mirroring network by adding the mirrorNetwork option to SystemTags.
    • Format of the mirrorNetwork option: mirrorNetwork::{L3NetworkVOUuid}
    • Example: mirrorNetwork::1c707a63817b4f29b1235fa1f76c0ccc
  • When you create a Layer 3 network in ZStack Cloud, you can record the Huawei SDN virtual router UUID associated with the VPC gateway by adding the logicalRouterUuid option to SystemTags.
    • Format of the logicalRouterUuid option: logicalRouterUuid::{%s}
    • Example: logicalRouterUuid::ecb4a71e0e32476da948a583ea0a220d
  • When you add a Huawei SDN controller in ZStack Cloud, you can record the VLAN range used by the SDN controller by adding startVlan::endVlan:: options to SystemTags.
    • Format of the startVlan and endVlan options: startVlan::{%s}::endVlan::{%s}
    • Example: startVlan::100::endVlan::1000

API Response

Sample Response
{
  "inventory": {
    "uuid": "cd65a5af636038bf91f4e404ef9594b1",
    "vendorType": "H3C-VCFC",
    "name": "updated-sdn-controller",
    "description": "Updated SDN controller configuration",
    "ip": "192.168.1.100",
    "username": "admin",
    "password": "newpassword",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM"
  }
}
Name Type Descriotion Starting Version
success boolean 5.4.0
inventory SdnControllerInventory

See inventory.

5.4.0
error ErrorCode Error code, null if operation succeeds, non-null if operation fails, see error. 5.4.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. 5.4.0
description String The brief description of the error. 5.4.0
details String The details about the error. 5.4.0
elaboration String The reserved field. Default value: null. 5.4.0
opaque LinkedHashMap The reserved field. Default value: null. 5.4.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. 5.4.0
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
vendorType String 5.4.0
vendorVersion String The vendor version. 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
ip String 5.4.0
username String 5.4.0
password String 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0
status SdnControllerStatus See status. 5.4.0
#status
Name Type Description Starting Version
Connecting SdnControllerStatus Connecting. 5.3.0
Connected SdnControllerStatus Connected. 5.3.0
Disconnected SdnControllerStatus Disconnected. 5.3.0

SDK Sample

Java SDK
ChangeSdnControllerAction action = new ChangeSdnControllerAction();
action.uuid = "fde0b2acbe6c3c7192e32d113f4e00b8";
action.userName = "sdnuser";
action.password = "newpassword";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ChangeSdnControllerAction.Result res = action.call();
Python SDK
ChangeSdnControllerAction action = ChangeSdnControllerAction()
action.uuid = "fde0b2acbe6c3c7192e32d113f4e00b8"
action.userName = "sdnuser"
action.password = "newpassword"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
ChangeSdnControllerAction.Result res = action.call()

PullSdnControllerTenant

API Request

URLs
PUT zstack/v1/sdn-controllers/{uuid}/tenant/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "pullSdnControllerTenant": {},
  "systemTags": [],
  "userTags": []
}
Note: In the proceding sample, both systemTagsand 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 PUT -d '{"pullSdnControllerTenant":{}}' http://localhost:8080/zstack/v1/sdn-controllers/6d53fa409b343fc8a231c100e3f3c90f/tenant/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 5.3.28
systemTags List body Optional. The system tags. 5.3.28
userTags List body Optional. The user tags. 5.3.28

API Response

Sample Response
{
  "inventories": []
}
Name Type Description Starting Version
success boolean 5.3.28
inventories List See inventories. 5.3.28
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.3.28
#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. 0.6
description String The brief description of the error. 0.6
details String The details about the error. 0.6
elaboration String The reserved field. Default value: null. 0.6
opaque LinkedHashMap The reserved field. Default value: null. 0.6
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 0.6
#inventories
Name Type Description Starting Version
uuid String The resource UUID. 5.3.28
sdnControllerUuid String 5.3.28
tenantUuid String 5.3.28
vdsUuid String 5.3.28
tenantName String 5.3.28
vdsName String 5.3.28
cloudDomainName String 5.3.28
status String 5.3.28
createDate Timestamp The creation date. 5.3.28
lastOpDate Timestamp The last operation date. 5.3.28

SDK Sample

Java SDK
PullSdnControllerTenantAction action = new PullSdnControllerTenantAction();
action.uuid = "6d53fa409b343fc8a231c100e3f3c90f";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
PullSdnControllerTenantAction.Result res = action.call();
Python SDK
PullSdnControllerTenantAction action = PullSdnControllerTenantAction()
action.uuid = "6d53fa409b343fc8a231c100e3f3c90f"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
PullSdnControllerTenantAction.Result res = action.call()

CreateHuaweiIMasterVRouter

API Request

URLs
POST zstack/v1/sdn-controller/huawei-imaster/vrouters
Headers
Authorization: OAuth the-session-uuid
Body
{
  "params": {
    "name": "test-vrouter",
    "description": "Test VRouter for Huawei iMaster",
    "huaweiVpcUuid": "67ed6b0065633829892c11ccf1ee2dba"
  },
  "systemTags": [],
  "userTags": []
}
Note: In the proceeding sample, both systemTagsand 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":{"name":"test-vrouter","description":"Test VRouter for Huawei iMaster","huaweiVpcUuid":"67ed6b0065633829892c11ccf1ee2dba"}}' http://localhost:8080/zstack/v1/sdn-controller/huawei-imaster/vrouters
Request Parameters
Name Type Location Description Optional Value Starting Version
name String body (contained in the params structure) The resource name. 5.4.0
description String body (contained in the params structure) Optional. The detailed description of the resource. 5.4.0
huaweiVpcUuid String body (contained in the params structure) 5.4.0
resourceUuid String body (contained in the params structure) Optional. The resource UUID. 5.4.0
tagUuids List body (contained in the params structure) Optional. The tag UUID list. 5.4.0
systemTags List body Optional. The system tags. 5.4.0
userTags List body Optional. The user tags. 5.4.0

API Response

Sample Response
{
  "inventory": {
    "uuid": "5a7236affa1f34d7908972b14956b18b",
    "name": "test-vrouter",
    "description": "Test VRouter for Huawei iMaster",
    "logicalNetworkId": "605a782332663c769f1845ac76efc526",
    "tenantId": "3350497bb7393700b77bc28d625468d8",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM"
  }
}
Name Type Description Starting Version
success boolean 5.4.0
error ErrorCode Error code, null if operation succeeds, non-null if operation fails, see error. 5.4.0
inventory HuaweiIMasterVRouterInventory See inventory. 5.4.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. 5.4.0
description String The brief description of the error. 5.4.0
details String The details about the error. 5.4.0
elaboration String The reserved field. Default value: null. 5.4.0
opaque LinkedHashMap The reserved field. Default value: null. 5.4.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. 5.4.0
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
logicalNetworkId String 5.4.0
tenantId String 5.4.0
fabricUuid String 5.4.0
deleted Boolean 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0

SDK Sample

Java SDK
CreateHuaweiIMasterVRouterAction action = new CreateHuaweiIMasterVRouterAction();
action.name = "test-vrouter";
action.description = "Test VRouter for Huawei iMaster";
action.huaweiVpcUuid = "67ed6b0065633829892c11ccf1ee2dba";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateHuaweiIMasterVRouterAction.Result res = action.call();
Python SDK
CreateHuaweiIMasterVRouterAction action = CreateHuaweiIMasterVRouterAction()
action.name = "test-vrouter"
action.description = "Test VRouter for Huawei iMaster"
action.huaweiVpcUuid = "67ed6b0065633829892c11ccf1ee2dba"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateHuaweiIMasterVRouterAction.Result res = action.call()

DeleteHuaweiIMasterVRouter

API Request

URLs
DELETE zstack/v1/sdn-controller/huawei-imaster/vrouters/{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-controller/huawei-imaster/vrouters/523c2083fec532b79fbc3701909e3b25
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 5.4.0
sdnControllerUuid String body Optional. 5.4.0
deleteMode String body Optional. The deletion mode (Permissive/Enforcing, Permissive). 5.4.0
systemTags List body Optional. The system tags. 5.4.0
userTags List body Optional. The user tags. 5.4.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
DeleteHuaweiIMasterVRouterAction action = new DeleteHuaweiIMasterVRouterAction();
action.uuid = "523c2083fec532b79fbc3701909e3b25";
action.sdnControllerUuid = "6f0803e4276a38308d958c2d8dc7381c";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteHuaweiIMasterVRouterAction.Result res = action.call();
Python SDK
DeleteHuaweiIMasterVRouterAction action = DeleteHuaweiIMasterVRouterAction()
action.uuid = "523c2083fec532b79fbc3701909e3b25"
action.sdnControllerUuid = "6f0803e4276a38308d958c2d8dc7381c"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteHuaweiIMasterVRouterAction.Result res = action.call()

QueryHuaweiIMasterVRouter

API Request

URLs
GET zstack/v1/sdn-controller/huawei-imaster/vrouters
GET zstack/v1/sdn-controller/huawei-imaster/vrouters/{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-controller/huawei-imaster/vrouters?q=uuid=6a3128b0ec823829ae6dbbdd9e59122e
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sdn-controller/huawei-imaster/vrouters/c59afc7c9cb739bab4286803ba3536fd

Queryable Fields

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

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "e75a229874b23b35903e52a6f52059cb",
      "name": "vrouter1",
      "description": "vrouter for test",
      "logicalNetworkId": "87ed0075640733c291aa223772d9d82d",
      "tenantId": "2f4c1e3a62fa3da1ab1cca8b53074b9f"
    }
  ]
}
Name Type Description Starting Version
success boolean 5.4.0
inventories List See inventories. 5.4.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.4.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. 5.4.0
description String The brief description of the error. 5.4.0
details String The brief description of the error. 5.4.0
elaboration String The reserved field. Default value: null. 5.4.0
opaque LinkedHashMap The reserved field. Default value: null. 5.4.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. 5.4.0
#inventories
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
logicalNetworkId String 5.4.0
tenantId String 5.4.0
fabricUuid String 5.4.0
deleted Boolean 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0

SDK Sample

Java SDK
QueryHuaweiIMasterVRouterAction action = new QueryHuaweiIMasterVRouterAction();
action.conditions = asList("uuid=5accb3ddb5b1343b81617f13d13a3632");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryHuaweiIMasterVRouterAction.Result res = action.call();
Python SDK
QueryHuaweiIMasterVRouterAction action = QueryHuaweiIMasterVRouterAction()
action.conditions = ["uuid=dd650dbcf99931a9a9bd442b2b3e4f0d"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryHuaweiIMasterVRouterAction.Result res = action.call()

DeleteHuaweiIMasterTenant

API Request

URLs
DELETE zstack/v1/sdn-controller/huawei-imaster/tenants/{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-controller/huawei-imaster/tenants/082fa02e39d53778a21a7e86b044ce17
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 5.4.0
sdnControllerUuid String body Optional. The SDN controller UUID. 5.4.0
deleteMode String body Optional. The deletion mode (Permissive/Enforcing, Permissive). 5.4.0
systemTags List body Optional. The system tags. 5.4.0
userTags List body Optional. The user tags. 5.4.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
DeleteHuaweiIMasterTenantAction action = new DeleteHuaweiIMasterTenantAction();
action.uuid = "082fa02e39d53778a21a7e86b044ce17";
action.sdnControllerUuid = "2969528393513dcb812b38947a2ff3bc";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteHuaweiIMasterTenantAction.Result res = action.call();
Python SDK
DeleteHuaweiIMasterTenantAction action = DeleteHuaweiIMasterTenantAction()
action.uuid = "082fa02e39d53778a21a7e86b044ce17"
action.sdnControllerUuid = "2969528393513dcb812b38947a2ff3bc"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteHuaweiIMasterTenantAction.Result res = action.call()

QueryHuaweiIMasterTenant

API Request

URLs
GET zstack/v1/sdn-controller/huawei-imaster/tenants
GET zstack/v1/sdn-controller/huawei-imaster/tenants/{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-controller/huawei-imaster/tenants?q=uuid=a611c5dc7e463ffaab957ebfc51e2afe
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sdn-controller/huawei-imaster/tenants/756bdfbf03b336f8863fa39595ffb7ca

Queryable Fields

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

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "4ca38813eb493b34a95f9f506c97f92d",
      "name": "tenant1",
      "description": "sdn for test",
      "fabricIds": [
        "5c9a525042c53d559350692d45de92b3"
      ]
    }
  ]
}
Name Type Description Starting Version
success boolean Whether the operation succeeds. 5.4.0
inventories List See inventories. 5.4.0
error ErrorCode See error. 5.4.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. 5.4.0
description String The brief description of the error. 5.4.0
details String The brief description of the error. 5.4.0
elaboration String The reserved field. Default value: null. 5.4.0
opaque LinkedHashMap The reserved field. Default value: null. 5.4.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. 5.4.0
#inventories
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
fabricIds String 5.4.0
sdnControllerUuid String 5.4.0
deleted Boolean 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0

SDK Sample

Java SDK
QueryHuaweiIMasterTenantAction action = new QueryHuaweiIMasterTenantAction();
action.conditions = asList("uuid=d57c6fedabbf3a5b91e543f5cf1c9980");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryHuaweiIMasterTenantAction.Result res = action.call();
Python SDK
QueryHuaweiIMasterTenantAction action = QueryHuaweiIMasterTenantAction()
action.conditions = ["uuid=3295ba081400315ea46f1f074b850933"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryHuaweiIMasterTenantAction.Result res = action.call()

DeleteHuaweiIMasterVpc

API Request

URLs
DELETE zstack/v1/sdn-controller/huawei-imaster/vpcs/{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-controller/huawei-imaster/vpcs/7daed678898c31968176551f0b718ab6
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 5.4.0
sdnControllerUuid String body 5.4.0
deleteMode String body Optional. The deletion mode (Permissive/Enforcing, Permissive). 5.4.0
systemTags List body Optional. The system tags. 5.4.0
userTags List body Optional. The user tags. 5.4.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
DeleteHuaweiIMasterVpcAction action = new DeleteHuaweiIMasterVpcAction();
action.uuid = "7daed678898c31968176551f0b718ab6";
action.sdnControllerUuid = "34bab7bf172633e78e54fdefdc5c0b6e";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteHuaweiIMasterVpcAction.Result res = action.call();
Python SDK
DeleteHuaweiIMasterVpcAction action = DeleteHuaweiIMasterVpcAction()
action.uuid = "7daed678898c31968176551f0b718ab6"
action.sdnControllerUuid = "34bab7bf172633e78e54fdefdc5c0b6e"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteHuaweiIMasterVpcAction.Result res = action.call()

QueryHuaweiIMasterVpc

API Request

URLs
GET zstack/v1/sdn-controller/huawei-imaster/vpcs
GET zstack/v1/sdn-controller/huawei-imaster/vpcs/{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-controller/huawei-imaster/vpcs?q=uuid=94ca3286f3e43125a09243d352c9428d
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sdn-controller/huawei-imaster/vpcs/e1101c95aee93111bc47ce3b83727169

Queryable Fields

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

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "1e7388c5359a3809b87bfe9c9c891061",
      "name": "vpc1",
      "description": "vpc for test",
      "tenantId": "07b9992d75a635619bac0bac52aac5bd",
      "fabricId": "a5bfb6a007c5380bb244975552fd9528"
    }
  ]
}
Name Type Description Starting Version
success boolean Whether the operaton succeeds. 5.4.0
inventories List See inventories. 5.4.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.4.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. 5.4.0
description String The brief description of the error. 5.4.0
details String The brief description of the error. 5.4.0
elaboration String The reserved field. Default value: null. 5.4.0
opaque LinkedHashMap The reserved field. Default value: null. 5.4.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. 5.4.0
#inventories
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
tenantId String The tenant ID. 5.4.0
fabricId String The fabric ID. 5.4.0
sdnControllerUuid String The SDN controller UUID. 5.4.0
deleted Boolean The deletion flag. 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0

SDK Sample

Java SDK
QueryHuaweiIMasterVpcAction action = new QueryHuaweiIMasterVpcAction();
action.conditions = asList("uuid=1949ad5872293963b8bc71047b5efa71");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryHuaweiIMasterVpcAction.Result res = action.call();
Python SDK
QueryHuaweiIMasterVpcAction action = QueryHuaweiIMasterVpcAction()
action.conditions = ["uuid=af61d2ecb4f93f98b0d75c7e1c3cff25"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryHuaweiIMasterVpcAction.Result res = action.call()

DeleteHuaweiIMasterFabric

API Request

URLs
DELETE zstack/v1/sdn-controller/huawei-imaster/fabrics/{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-controller/huawei-imaster/fabrics/1aa09d25169430c2a01ec3f1b6f1ff67
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 5.4.0
sdnControllerUuid String body Optional. 5.4.0
deleteMode String body Optional. The deletion mode (Permissive/Enforcing, Permissive). 5.4.0
systemTags List body Optional. The system tags. 5.4.0
userTags List body Optional. The user tags. 5.4.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
DeleteHuaweiIMasterFabricAction action = new DeleteHuaweiIMasterFabricAction();
action.uuid = "1aa09d25169430c2a01ec3f1b6f1ff67";
action.sdnControllerUuid = "7b50926063c439b4ba2b2da766b6dc67";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteHuaweiIMasterFabricAction.Result res = action.call();
Python SDK
DeleteHuaweiIMasterFabricAction action = DeleteHuaweiIMasterFabricAction()
action.uuid = "1aa09d25169430c2a01ec3f1b6f1ff67"
action.sdnControllerUuid = "7b50926063c439b4ba2b2da766b6dc67"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteHuaweiIMasterFabricAction.Result res = action.call()

QueryHuaweiIMasterFabric

API Request

URLs
GET zstack/v1/sdn-controller/huawei-imaster/fabrics
GET zstack/v1/sdn-controller/huawei-imaster/fabrics/{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-controller/huawei-imaster/fabrics?q=uuid=838b4d7e1c6937b08065c471fcdb5d03
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sdn-controller/huawei-imaster/fabrics/99e0f6310d3f3a75ad1856fff8014061

Queryable Fields

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

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "74c62e19bc8f3792979d2d70b7af53a4",
      "name": "fabric",
      "description": "fabric for test"
    }
  ]
}
Name Type Description Starting Version
success boolean 5.4.0
inventories List Seeinventories. 5.4.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.4.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. 0.6
description String The brief description of the error. 0.6
details String The brief description of the error. 0.6
elaboration String The reserved field. Default value: null. 0.6
opaque LinkedHashMap The reserved field. Default value: null. 0.6
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 0.6
#inventories
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
sdnControllerUuid String The SDN controller UUID. 5.4.0
deleted Boolean The deletion flag. 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0

SDK Sample

Java SDK
QueryHuaweiIMasterFabricAction action = new QueryHuaweiIMasterFabricAction();
action.conditions = asList("uuid=f9aae037a6cf38b68374e7b1c8d3e65b");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryHuaweiIMasterFabricAction.Result res = action.call();
Python SDK
QueryHuaweiIMasterFabricAction action = QueryHuaweiIMasterFabricAction()
action.conditions = ["uuid=1b1c880dd7f43329affa520bfcbe635b"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryHuaweiIMasterFabricAction.Result res = action.call()

ReconnectSdnController

API Request

URLs
PUT zstack/v1/sdn-controllers/{sdnControllerUuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "reconnectSdnController": {},
  "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 PUT -d '{"reconnectSdnController":{}}' http://localhost:8080/zstack/v1/sdn-controllers/911e4bc69d453bf89aae865ea6878263/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
sdnControllerUuid String url 5.3.20
systemTags List body Optional. The system tags. 5.3.20
userTags List body Optional. The user tags. 5.3.20

API Response

Sample Response
{
  "inventory": {
    "uuid": "65eede773d4a340681558318aabdc6a5",
    "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.0
inventory SdnControllerInventory See inventory. 5.3.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.3.0
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 5.3.20
vendorType String 5.3.20
vendorVersion String The vendor version. 5.4.0
name String The resource name. 5.3.20
description String The detailed description of the resource. 5.3.20
ip String 5.3.20
username String 5.3.20
password String 5.3.20
createDate Timestamp The creation date. 5.3.20
lastOpDate Timestamp The last operation date. 5.3.20
status SdnControllerStatus See status. 5.3.20
hostRefs List See hostRefs. 5.3.0
#hostRefs
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
#status
Name Type Description Starting Version
Connecting SdnControllerStatus Connecting. 5.3.0
Connected SdnControllerStatus Connected. 5.3.0
Disconnected SdnControllerStatus Disconnected. 5.3.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. 5.3.20
description String The brief description of the error. 5.3.20
details String The details about the error. 5.3.20
elaboration String The reserved field. Default value: null. 5.3.20
opaque LinkedHashMap The reserved field. Default value: null. 5.3.20
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 5.3.20

SDK Sample

Java SDK
ReconnectSdnControllerAction action = new ReconnectSdnControllerAction();
action.sdnControllerUuid = "911e4bc69d453bf89aae865ea6878263";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ReconnectSdnControllerAction.Result res = action.call();
Python SDK
ReconnectSdnControllerAction action = ReconnectSdnControllerAction()
action.sdnControllerUuid = "911e4bc69d453bf89aae865ea6878263"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
ReconnectSdnControllerAction.Result res = action.call()

UpdateSdnController

API Request

URLs
PUT zstack/v1/sdn-controllers/{uuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "updateSdnController": {
    "name": "Test-Net",
    "description": "Test"
  },
  "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 PUT -d '{"updateSdnController":{"name":"Test-Net","description":"Test"}}' http://localhost:8080/zstack/v1/sdn-controllers/4a39301758b13cda968bdcd866452d14/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 3.7.0
name String body (contained in the updateSdnController structure) Optional. The resource name. 3.7.0
description String body (contained in the updateSdnController structure) Optional. The detailed description of the resource. 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

Sample Response
{
  "inventory": {
    "uuid": "722428da8bac30d2b75daa2f6cd34e9d",
    "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 0.6
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
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.0
#status
Name Type Description Starting Version
Connecting SdnControllerStatus Connecting. 5.3.0
Connected SdnControllerStatus Connected. 5.3.0
Disconnected SdnControllerStatus Disconnected. 5.3.0

SDK Sample

Java SDK
UpdateSdnControllerAction action = new UpdateSdnControllerAction();
action.uuid = "4a39301758b13cda968bdcd866452d14";
action.name = "Test-Net";
action.description = "Test";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateSdnControllerAction.Result res = action.call();
Python SDK
UpdateSdnControllerAction action = UpdateSdnControllerAction()
action.uuid = "4a39301758b13cda968bdcd866452d14"
action.name = "Test-Net"
action.description = "Test"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateSdnControllerAction.Result res = action.call()

PullHuaweiIMasterController

API Request

URLs
PUT zstack/v1/sdn-controller/huawei-imaster/{uuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "pullHuaweiIMasterController": {
    "pullSwitch": false
  },
  "systemTags": [],
  "userTags": []
}
Note: In the proceding sample, both systemTagsand 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 PUT -d '{"pullHuaweiIMasterController":{"pullSwitch":false}}' http://localhost:8080/zstack/v1/sdn-controller/huawei-imaster/10b101c6b2583c1ab6a08c4ea6962d6a/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url Optional. The resource UUID. 5.4.0
pullSwitch boolean body (contained in thepullHuaweiIMasterController structure) Optional. Whether to pull the switch information. 5.4.0
systemTags List body Optional. The system tags. 5.4.0
userTags List body Optional. The user tags. 5.4.0

API Response

Sample Response
{
  "inventories": []
}
Name Type Description Starting version
success boolean 5.4.0
inventories List See inventories. 5.4.0
error ErrorCode Error code, null if operation succeeds, non-null if operation fails, see error. 5.4.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. 5.4.0
description String The brief description of the error. 5.4.0
details String The details about the error. 5.4.0
elaboration String The reserved field. Default value: null. 5.4.0
opaque LinkedHashMap The reserved field. Default value: null. 5.4.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. 5.4.0
#inventories
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
vendorType String 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
ip String 5.4.0
username String 5.4.0
password String 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0
fabrics List See fabrics. 5.4.0
tenants List See tenants. 5.4.0
vpcs List See vpcs. 5.4.0
vrouters List See vrouters. 5.4.0
status SdnControllerStatus See status. 5.4.0
vniRanges List See vniRanges. 5.4.0
vxlanPools List See vxlanPools. 5.4.0
hostRefs List See hostRefs. 5.4.0
#fabrics
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
sdnControllerUuid String The SDN controller UUID. 5.4.0
deleted Boolean The deletion flag. 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0
#tenants
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
fabricIds String 5.4.0
sdnControllerUuid String 5.4.0
deleted Boolean 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0
#vpcs
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
tenantId String The tenant ID. 5.4.0
fabricId String The fabric ID. 5.4.0
sdnControllerUuid String The SDN controller UUID. 5.4.0
deleted Boolean The deletion flag. 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0
#vrouters
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
logicalNetworkId String 5.4.0
tenantId String 5.4.0
fabricUuid String 5.4.0
deleted Boolean 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0
#status
Name Type Description Starting Version
Connecting SdnControllerStatus Connecting. 5.4.0
Connected SdnControllerStatus Connected. 5.4.0
Disconnected SdnControllerStatus Disconnected. 5.4.0
#vniRanges
Name Type Description Starting Version
startVni Integer 5.4.0
endVni Integer 5.4.0
#vxlanPools
Name Type Description Starting Version
sdnControllerUuid String 5.4.0
attachedCidrs Map 5.4.0
uuid String The resource UUID. 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
zoneUuid String The zone UUID. 5.4.0
physicalInterface String 5.4.0
type String 5.4.0
vSwitchType String 5.4.0
virtualNetworkId Integer 5.4.0
isolated Boolean 5.4.0
pvlan String 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0
attachedClusterUuids List 5.4.0
attachedVtepRefs List See attachedVtepRefs. 5.4.0
remoteVteps List See remoteVteps. 5.4.0
attachedVxlanNetworkRefs List See attachedVxlanNetworkRefs. 5.4.0
attachedVniRanges List See attachedVniRanges. 5.4.0
#attachedVtepRefs
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
hostUuid String The host UUID. 5.4.0
vtepIp String 5.4.0
port Integer 5.4.0
type String 5.4.0
physicalInterface String 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0
poolUuid String The VXLAN pool UUID. 5.4.0
#remoteVteps
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
clusterUuid String The cluster UUID. 5.4.0
vtepIp String The VXLAN Tunnel Endpoint. 5.4.0
port Integer The port. 5.4.0
type String The type. 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0
poolUuid String The UUID of the VXLAN resource pool. 5.4.0
#attachedVxlanNetworkRefs
Name Type Description Starting Version
vni Integer The VNI number. 5.4.0
poolUuid String The VXLAN pool UUID. 5.4.0
uuid String The resource UUID. 5.4.0
name String The resource name. 5.4.0
description String The detailed description or the resource. 5.4.0
zoneUuid String The zone UUID. 5.4.0
physicalInterface String The physical NIC. 5.4.0
type String The L2 network type. 5.4.0
vSwitchType String 5.4.0
virtualNetworkId Integer 5.4.0
isolated Boolean 5.4.0
pvlan String 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0
attachedClusterUuids List The attached cluster UUID list. 5.4.0
#attachedVniRanges
Name Type Description Starting Version
uuid String The resource UUID. 5.4.0
name String The resource name. 5.4.0
description String The detailed description of the resource. 5.4.0
startVni Integer The start VNI. 5.4.0
endVni Integer The end VNI. 5.4.0
createDate Timestamp The creation date. 5.4.0
lastOpDate Timestamp The last operation date. 5.4.0
l2NetworkUuid String The L2 network UUID. 5.4.0
#hostRefs
Name Type Description Starting Version
sdnControllerUuid String The resource UUID. 5.4.0
hostUuid String The physical server UUID. 5.4.0
vSwitchType String The virtual switch type. 5.4.0
vtepIp String The physical server VTEP IP address. 5.4.0
nicPciAddresses String The mapping of physical NICs to PCI addresses. 5.4.0
nicDrivers String The mapping of physical NICs to driver types. 5.4.0
netmask String The netmask of the physical server's VTEP IP. 5.4.0
bondMode String The bonding mode of the physical NICs. 5.4.0
lacpMode String The LACP mode of the physical NICs. 5.4.0

SDK Sample

Java SDK
PullHuaweiIMasterControllerAction action = new PullHuaweiIMasterControllerAction();
action.uuid = "10b101c6b2583c1ab6a08c4ea6962d6a";
action.pullSwitch = false;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
PullHuaweiIMasterControllerAction.Result res = action.call();
Python SDK
PullHuaweiIMasterControllerAction action = PullHuaweiIMasterControllerAction()
action.uuid = "10b101c6b2583c1ab6a08c4ea6962d6a"
action.pullSwitch = false
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
PullHuaweiIMasterControllerAction.Result res = action.call()

SdnControllerAddHost

API Request

URLs
POST zstack/v1/sdn-controllers/{sdnControllerUuid}/hosts/{hostUuid}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST http://localhost:8080/zstack/v1/sdn-controllers/13dced0afb8d3bb4ad238eb476eca64e/hosts/1f4e13ef459c39968a10f79cc5905ea4
Request Parameters
Name Type Location Description Optional Value Starting Version
sdnControllerUuid String url The SDN controller UUID. 5.3.0
hostUuid String url The host UUID. 5.3.0
vSwitchType String body Optional. The virtual switch type.
  • OvsKernel
  • OvsDpdk
  • SRIOV
5.3.0
nicNames List body The name list of physical server's NICs. 5.3.0
vtepIp String body Optional. The physical server's VTEP IP. 5.3.0
systemTags List body Optional. The system tags. 5.3.0
userTags List body Optional. The user tags. 5.3.0
netmask String body Optional. The physical server's VTEP IP netmask. 5.3.0
bondMode String body Optional. The physical server's NIC bond mode. 5.3.0
lacpMode String body Optional. The physical server's NIC LACP mode. 5.3.0

API Response

Sample Response
{
  "inventory": {
    "uuid": "2b317c278d253df6bab1acd9b293d957",
    "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.0
inventory SdnControllerInventory See inventory. 5.3.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.3.0
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 5.3.0
vendorType String 5.3.0
vendorVersion String The vendor version. 5.4.0
name String The resource name. 5.3.0
description String The detailed description of the resource. 5.3.0
ip String 5.3.0
username String 5.3.0
password String 5.3.0
createDate Timestamp The creation date. 5.3.0
lastOpDate Timestamp The last operation date. 5.3.0
status SdnControllerStatus See status. 5.3.0
hostRefs List See hostRefs. 5.3.0
#status
Name Type Description Starting Version
Connecting SdnControllerStatus Connecting. 5.3.0
Connected SdnControllerStatus Connected. 5.3.0
Disconnected SdnControllerStatus Disconnected. 5.3.0
#hostRefs
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
#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. 5.3.0
description String The brief description of the error. 5.3.0
details String The details about the error. 5.3.0
elaboration String The reserved field. Default value: null. 5.3.0
opaque LinkedHashMap The reserved field. Default value: null. 5.3.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. 5.3.0

SDK Sample

Java SDK
SdnControllerAddHostAction action = new SdnControllerAddHostAction();
action.sdnControllerUuid = "13dced0afb8d3bb4ad238eb476eca64e";
action.hostUuid = "1f4e13ef459c39968a10f79cc5905ea4";
action.vSwitchType = "H3C VCFC";
action.vtepIp = "192.168.1.101";
action.netmask = "ens1 ens2";
action.bondMode = "active-backup";
action.lacpMode = "off";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SdnControllerAddHostAction.Result res = action.call();
Python SDK
SdnControllerAddHostAction action = SdnControllerAddHostAction()
action.sdnControllerUuid = "13dced0afb8d3bb4ad238eb476eca64e"
action.hostUuid = "1f4e13ef459c39968a10f79cc5905ea4"
action.vSwitchType = "H3C VCFC"
action.vtepIp = "192.168.1.101"
action.netmask = "ens1 ens2"
action.bondMode = "active-backup"
action.lacpMode = "off"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SdnControllerAddHostAction.Result res = action.call()

SdnControllerChangeHost

API Request

URLs
PUT zstack/v1/sdn-controllers/{sdnControllerUuid}/hosts/{hostUuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "sdnControllerChangeHost": {
    "vSwitchType": "H3C VCFC",
    "vtepIp": "192.168.1.101",
    "netmask": "ens1 ens2",
    "bondMode": "active-backup",
    "lacpMode": "off"
  },
  "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 PUT -d '{"sdnControllerChangeHost":{"vSwitchType":"H3C VCFC","vtepIp":"192.168.1.101","netmask":"ens1 ens2","bondMode":"active-backup","lacpMode":"off"}}' http://localhost:8080/zstack/v1/sdn-controllers/51a894d84f22366eb0ff853748f7cb1d/hosts/772b68aff57f3bbb82c40d569d6bc76a/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
sdnControllerUuid String url The SDN controller UUID. 5.3.0
hostUuid String url The host UUID. 5.3.0
vSwitchType String body (contained in thesdnControllerChangeHoststructure) Optional. The virtual switch type.
  • OvnDpdk
  • OvnKernel
5.3.0
nicNames List body (contained in thesdnControllerChangeHoststructure) Optional. The list of physical server's nic names. 5.3.0
vtepIp String body (contained in the sdnControllerChangeHoststructure) Optional. The physical server's VTEP IP. 5.3.0
netmask String body (contained in thesdnControllerChangeHoststructure) Optional. The physical server's VTEP IP netmask. 5.3.0
bondMode String body (contained in thesdnControllerChangeHoststructure) Optional. The physical server's bond mode. 5.3.0
lacpMode String body(containted in thesdnControllerChangeHoststructure) Optional. The physical server's LACP mode. 5.3.0
systemTags List body Optional. The system tags. 5.3.0
userTags List body Optional. The user tags. 5.3.0

API Response

Sample Response
{
  "inventory": {
    "uuid": "b2d35464d0db3362b605c1e79814f237",
    "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.0
inventory SdnControllerInventory Seeinventory. 5.3.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.3.0
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 5.3.0
vendorType String 5.3.0
vendorVersion String The vendor version. 5.4.0
name String The resource name. 5.3.0
description String The detailed description of the resource. 5.3.0
ip String 5.3.0
username String 5.3.0
password String 5.3.0
createDate Timestamp The creation date. 5.3.0
lastOpDate Timestamp The last operation date. 5.3.0
status SdnControllerStatus See status. 5.3.0
hostRefs List See hostRefs. 5.3.0
#status
Name Type Description Starting Version
Connecting SdnControllerStatus Connecting. 5.3.0
Connected SdnControllerStatus Connected. 5.3.0
Disconnected SdnControllerStatus Disconnected. 5.3.0
#hostRefs
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
#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. 5.3.0
description String The brief description of the error. 5.3.0
details String The details about the error. 5.3.0
elaboration String The reserved field. Default value: null. 5.3.0
opaque LinkedHashMap The reserved field. Default value: null. 5.3.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. 5.3.0

SDK Sample

Java SDK
SdnControllerChangeHostAction action = new SdnControllerChangeHostAction();
action.sdnControllerUuid = "51a894d84f22366eb0ff853748f7cb1d";
action.hostUuid = "772b68aff57f3bbb82c40d569d6bc76a";
action.vSwitchType = "H3C VCFC";
action.vtepIp = "192.168.1.101";
action.netmask = "ens1 ens2";
action.bondMode = "active-backup";
action.lacpMode = "off";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SdnControllerChangeHostAction.Result res = action.call();
Python SDK
SdnControllerChangeHostAction action = SdnControllerChangeHostAction()
action.sdnControllerUuid = "51a894d84f22366eb0ff853748f7cb1d"
action.hostUuid = "772b68aff57f3bbb82c40d569d6bc76a"
action.vSwitchType = "H3C VCFC"
action.vtepIp = "192.168.1.101"
action.netmask = "ens1 ens2"
action.bondMode = "active-backup"
action.lacpMode = "off"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SdnControllerChangeHostAction.Result res = action.call()

SdnControllerRemoveHost

API Request

URLs
DELETE zstack/v1/sdn-controllers/{sdnControllerUuid}/hosts/{hostUuid}
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/2adbaedc05a03129bd055ba7a3f045cc/hosts/1fb1da4d101335b2b981f0b107ac7ba8
Request Parameters
Name Type Location Description Optional Value Starting Version
sdnControllerUuid String url The SDN controller UUID. 5.3.0
hostUuid String url The host UUID. 5.3.0
vSwitchType String body The virtual switch type.
  • OvnDpdk
  • OvnKernel
5.3.0
systemTags List body Optional. The system tags. 5.3.0
userTags List body Optional. The user tags. 5.3.0

API Response

Sample Response
{
  "inventory": {
    "uuid": "5aedd20ff2883bca8bdcc0dd7a46e779",
    "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.0
inventory SdnControllerInventory Seeinventory. 5.3.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.3.0
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 5.3.0
vendorType String 5.3.0
vendorVersion String The vendor type. 5.4.0
name String The resource name. 5.3.0
description String The detailed description of the resource. 5.3.0
ip String 5.3.0
username String 5.3.0
password String 5.3.0
createDate Timestamp The creation date. 5.3.0
lastOpDate Timestamp The last operation date. 5.3.0
status SdnControllerStatus See status. 5.3.0
hostRefs List See hostRefs. 5.3.0
#status
Name Type Description Starting Version
Connecting SdnControllerStatus Connecting. 5.3.0
Connected SdnControllerStatus Connected. 5.3.0
Disconnected SdnControllerStatus Disconnected. 5.3.0
#hostRefs
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
#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. 5.3.0
description String The brief description of the error. 5.3.0
details String The details about the error. 5.3.0
elaboration String The reserved field. Default value: null. 5.3.0
opaque LinkedHashMap The reserved field. Default value: null. 5.3.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. 5.3.0

SDK Sample

Java SDK
SdnControllerRemoveHostAction action = new SdnControllerRemoveHostAction();
action.sdnControllerUuid = "2adbaedc05a03129bd055ba7a3f045cc";
action.hostUuid = "1fb1da4d101335b2b981f0b107ac7ba8";
action.vSwitchType = "OvnDpdk";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SdnControllerRemoveHostAction.Result res = action.call();
Python SDK
SdnControllerRemoveHostAction action = SdnControllerRemoveHostAction()
action.sdnControllerUuid = "2adbaedc05a03129bd055ba7a3f045cc"
action.hostUuid = "1fb1da4d101335b2b981f0b107ac7ba8"
action.vSwitchType = "OvnDpdk"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SdnControllerRemoveHostAction.Result res = action.call()

CreateOvnControllerVm

API Request

URLs
POST zstack/v1/ovn/instances
Headers
Authorization: OAuth the-session-uuid
Body
{
  "params": {
    "name": "zstack ovn controller",
    "description": "this is a sdn controller instance",
    "strategy": "InstantStart"
  },
  "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":{"name":"zstack ovn controller","description":"this is a sdn controller instance","strategy":"InstantStart"}}' http://localhost:8080/zstack/v1/ovn/instances
Request Parameters
Name Type Location Description Optional Value Starting Version
name String body (contained in theparamsstructure) Optional. The OVN instance name. 5.3.20
instanceOfferingUuid String body (contained in theparamsstructure) Optional. The OVN offering UUID. 5.3.20
cpuNum Integer body (contained in theparamsstructure) Optional.The CPU number. 5.3.20
memorySize Long body (contained in theparamsstructure) Optional. The memory size. 5.3.20
reservedMemorySize Long body (contained in theparamsstructure) Optional. 5.3.20
imageUuid String body (contained in theparamsstructure) The image UUID. 5.3.20
l3NetworkUuids List body (contained in theparamsstructure) Optional. The L3 network UUID. 5.3.20
vmNicParams String body (contained in theparamsstructure) Optional. 5.3.20
type String body (contained in theparamsstructure) Optional.
  • UserVm
  • ApplianceVm
5.3.20
rootDiskOfferingUuid String body (contained in theparamsstructure) Optional. 5.3.20
rootDiskSize Long body (contained in theparamsstructure) Optional. 5.3.20
dataDiskSizes List body (contained in theparamsstructure) Optional 5.3.20
dataDiskOfferingUuids List body (contained in theparamsstructure) Optional. 5.3.20
zoneUuid String body (contained in theparamsstructure) Optional. The zone UUID. 5.3.20
clusterUuid String body (contained in theparamsstructure) Optional. The cluster UUID. 5.3.20
hostUuid String body (contained in theparamsstructure) Optional. The host UUID. 5.3.20
primaryStorageUuidForRootVolume String body (contained in theparamsstructure) Optional. 5.3.20
description String body (contained in theparamsstructure) Optional. The detailed description of the resource. 5.3.20
defaultL3NetworkUuid String body (contained in theparamsstructure) Optional. 5.3.20
strategy String body (contained in theparamsstructure) Optional.
  • InstantStart
  • JustCreate
  • CreateStopped
5.3.20
rootVolumeSystemTags List body (contained in theparamsstructure) Optional. 5.3.20
dataVolumeSystemTags List body (contained in theparamsstructure) Optional. 5.3.20
dataVolumeSystemTagsOnIndex Map body (contained in theparamsstructure) Optional. 5.3.20
sshKeyPairUuids List body (contained in theparamsstructure) Optional. 5.3.20
platform String body (contained in theparamsstructure) Optional.
  • Linux
  • Windows
  • Other
  • Paravirtualization
  • WindowsVirtio
5.3.20
guestOsType String body (contained in theparamsstructure) Optional. 5.3.20
architecture String body (contained in theparamsstructure) Optional.
  • x86_64
  • aarch64
  • mips64el
  • loongarch64
5.3.20
virtio Boolean body (contained in theparamsstructure) Optional. 5.3.20
diskAOs List body (contained in theparamsstructure) Optional. 5.3.20
resourceUuid String body (contained in theparamsstructure) The resource UUID. 5.3.20
tagUuids List body (contained in theparamsstructure) Optional. The tag UUID. 5.3.20
systemTags List body Optional. The system tags. 5.3.20
userTags List body Optional. The user tags. 5.3.20

API Response

Sample Response
{
  "inventory": {}
}
Name Type Description Starting Version
success boolean 5.3.20
inventory ApplianceVmInventory Seeinventory. 5.3.20
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.3.20
#inventory
Name Type Description Starting Version
applianceVmType String 5.3.20
managementNetworkUuid String 5.3.20
defaultRouteL3NetworkUuid String 5.3.20
status String 5.3.20
agentPort Integer 5.3.20
uuid String The resource UUID. 5.3.20
name String The resource name. 5.3.20
description String The detailed description of the resource. 5.3.20
zoneUuid String The zone UUID. 5.3.20
clusterUuid String The cluster UUID. 5.3.20
imageUuid String The image UUID. 5.3.20
hostUuid String The host UUID. 5.3.20
lastHostUuid String 5.3.20
instanceOfferingUuid String The instance offering UUID. 5.3.20
rootVolumeUuid String The root volume UUID. 5.3.20
platform String 5.3.20
defaultL3NetworkUuid String 5.3.20
type String 5.3.20
hypervisorType String 5.3.20
memorySize Long 5.3.20
cpuNum Integer 5.3.20
cpuSpeed Long 5.3.20
allocatorStrategy String 5.3.20
createDate Timestamp The creation date. 5.3.20
lastOpDate Timestamp The last operation date. 5.3.20
state String 5.3.20
vmNics List See vmNics. 5.3.20
allVolumes List See allVolumes. 5.3.20
#vmNics
Name Type Description Starting Version
uuid String The resource UUID. 5.3.20
vmInstanceUuid String The VM instance UUID. 5.3.20
l3NetworkUuid String The L3 network UUID. 5.3.20
ip String 5.3.20
mac String 5.3.20
hypervisorType String 5.3.20
netmask String 5.3.20
gateway String 5.3.20
metaData String 5.3.20
ipVersion Integer 5.3.20
driverType String 5.3.20
internalName String 5.3.20
deviceId Integer 5.3.20
type String 5.3.20
state String The nic state. 5.3.20
createDate Timestamp The creation date. 5.3.20
lastOpDate Timestamp The last operation date. 5.3.20
usedIps List See usedIps. 5.3.20
#usedIps
Name Type Description Starting Version
uuid String The resource UUID. 5.3.20
ipRangeUuid String The IP range UUID. 5.3.20
l3NetworkUuid String The L3 network UUID. 5.3.20
ipVersion Integer 5.3.20
ip String 5.3.20
netmask String 5.3.20
gateway String 5.3.20
usedFor String The reason for allocation. 5.3.20
ipInLong long 5.3.20
ipInBinary byte[] 5.3.20
vmNicUuid String The VM NIC UUID. 5.3.20
createDate Timestamp The creation date. 5.3.20
lastOpDate Timestamp The last operation date. 5.3.20
#allVolumes
Name Type Description Starting Version
uuid String The resource UUID. 5.3.20
name String The resource name. 5.3.20
description String The detailed description of the resource. 5.3.20
primaryStorageUuid String The primary storage UUID. 5.3.20
vmInstanceUuid String The VM instance UUID. 5.3.20
diskOfferingUuid String The disk offering UUID. 5.3.20
rootImageUuid String 5.3.20
installPath String 5.3.20
type String 5.3.20
format String 5.3.20
size Long 5.3.20
actualSize Long 5.3.20
deviceId Integer 5.3.20
state String 5.3.20
status String 5.3.20
createDate Timestamp The creation date. 5.3.20
lastOpDate Timestamp The last operation date. 5.3.20
isShareable Boolean 5.3.20
volumeQos String 5.3.20
lastDetachDate Timestamp 5.3.20
lastVmInstanceUuid String 5.3.20
#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. 5.3.20
description String The brief description of the error. 5.3.20
details String The details about the error. 5.3.20
elaboration String The reserved field. Default value: null. 5.3.20
opaque LinkedHashMap The reserved field. Default value: null. 5.3.20
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 5.3.20

SDK Sample

Java SDK
CreateOvnControllerVmAction action = new CreateOvnControllerVmAction();
action.name = "zstack ovn controller";
action.description = "this is a sdn controller instance";
action.strategy = "InstantStart";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateOvnControllerVmAction.Result res = action.call();
Python SDK
CreateOvnControllerVmAction action = CreateOvnControllerVmAction()
action.name = "zstack ovn controller"
action.description = "this is a sdn controller instance"
action.strategy = "InstantStart"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateOvnControllerVmAction.Result res = action.call()

CreateOvnControllerOffering

API Request

URLs
POST zstack/v1/instance-offerings/ovn
Headers
Authorization: OAuth the-session-uuid
Body
{
  "params": {
    "zoneUuid": "9ea522ec01fc3da286fa47b8a60a0824",
    "managementNetworkUuid": "3302e9bed4e33ab68912cf3d75fcc749",
    "imageUuid": "c2e0cc0faa713de795a079ad7b6470d0",
    "name": "ovn-Offering",
    "cpuNum": 2,
    "memorySize": 1024,
    "reservedMemorySize": 0,
    "sortKey": 0,
    "type": "Ovn"
  },
  "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":{"zoneUuid":"9ea522ec01fc3da286fa47b8a60a0824","managementNetworkUuid":"3302e9bed4e33ab68912cf3d75fcc749","imageUuid":"c2e0cc0faa713de795a079ad7b6470d0","name":"ovn-Offering","cpuNum":2,"memorySize":1024,"reservedMemorySize":0,"sortKey":0,"type":"Ovn"}}' http://localhost:8080/zstack/v1/instance-offerings/ovn
Request Parameters
Name Type Location Description Optional Value Starting Version
zoneUuid String body (contained in theparamsstructure) The zone UUID. 5.3.0
managementNetworkUuid String body (contained in theparamsstructure) The management network UUID. 5.3.0
imageUuid String body (contained in theparamsstructure) The image UUID. 5.3.0
name String body (contained in theparamsstructure) The offering name. 5.3.0
description String body (contained in theparamsstructure) Optional. The detailed description of the resource. 5.3.0
cpuNum int body (contained in theparamsstructure) The CPU number. 5.3.0
memorySize long body (contained in theparamsstructure) The memory size in Byte. 5.3.0
reservedMemorySize long body (contained in theparamsstructure) Optional. 5.3.0
allocatorStrategy String body (contained in theparamsstructure) Optional. The allocation strategy. 5.3.0
sortKey int body (contained in theparamsstructure) Optional. 5.3.0
type String body (contained in theparamsstructure) Optional. 5.3.0
resourceUuid String body (contained in theparamsstructure) Optional. The resource UUID. 5.3.0
tagUuids List body (contained in theparamsstructure) Optional. The tag UUID. 5.3.0
systemTags List body Optional. The system tags. 5.3.0
userTags List body Optional. The user tags. 5.3.0

API Response

Sample Response
{
  "inventory": {
    "uuid": "3b0af4671cc93f619ef326a3c99d825c",
    "name": "instanceOffering1",
    "cpuNum": 2,
    "cpuSpeed": 1,
    "type": "UserVm",
    "allocatorStrategy": "Mevoco",
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM",
    "state": "Enabled"
  }
}
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. 5.3.20
inventory InstanceOfferingInventory Seeinventory. 5.3.20
#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. 5.3.20
description String The brief description of the error. 5.3.20
details String The details about the error. 5.3.20
elaboration String The reserved field. Default value: null. 5.3.20
opaque LinkedHashMap The reserved field. Default value: null. 5.3.20
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 5.3.20
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 5.3.20
name String The resource name. 5.3.20
description String The detailed description of the resource. 5.3.20
cpuNum Integer The CPU number. 5.3.20
cpuSpeed Integer The CPU speed. 5.3.20
memorySize Long The memory size. 5.3.20
type String The type. 5.3.20
allocatorStrategy String The allocation strategy. 5.3.20
sortKey Integer 5.3.20
createDate Timestamp The creation date. 5.3.20
lastOpDate Timestamp The last operation date. 5.3.20
state String The state. 5.3.20

SDK Sample

Java SDK
CreateOvnControllerOfferingAction action = new CreateOvnControllerOfferingAction();
action.zoneUuid = "9ea522ec01fc3da286fa47b8a60a0824";
action.managementNetworkUuid = "3302e9bed4e33ab68912cf3d75fcc749";
action.imageUuid = "c2e0cc0faa713de795a079ad7b6470d0";
action.name = "ovn-Offering";
action.cpuNum = 2;
action.memorySize = 1024;
action.reservedMemorySize = 0;
action.sortKey = 0;
action.type = "Ovn";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateOvnControllerOfferingAction.Result res = action.call();
Python SDK
CreateOvnControllerOfferingAction action = CreateOvnControllerOfferingAction()
action.zoneUuid = "9ea522ec01fc3da286fa47b8a60a0824"
action.managementNetworkUuid = "3302e9bed4e33ab68912cf3d75fcc749"
action.imageUuid = "c2e0cc0faa713de795a079ad7b6470d0"
action.name = "ovn-Offering"
action.cpuNum = 2
action.memorySize = 1024
action.reservedMemorySize = 0
action.sortKey = 0
action.type = "Ovn"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateOvnControllerOfferingAction.Result res = action.call()
API Reference | 5.4.12 | ZStack Cloud · ZCF | ZStack Resource Center