OSPF Operations
CreateVRouterOspfArea
API Request
URLs
POST zstack/v1/routerAreaHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"areaId": "1.1.1.1"
},
"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":{"areaId":"1.1.1.1"}}' http://localhost:8080/zstack/v1/routerAreaRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| areaId | String | body (contained in the params structure) | The area ID. | 3.4.0 | |
| areaAuth | String | body (contained in the params structure) | Optional. The authentication mode of the OSPF area. | 3.4.0 | |
| areaType | String | body (contained in the params structure) | Optional. The area type. | 3.4.0 | |
| password | String | body (contained in the params structure) | Optional. The password when the authentication mode is plaintext. | 3.4.0 | |
| keyId | Integer | body (contained in the params structure) | Optional. The key ID when the authentication mode is MD5 checksum. | 3.4.0 | |
| resourceUuid | String | body (contained in the params structure) | Optional. The area resource UUID. | 3.4.0 | |
| tagUuids | List | body (contained in the params structure) | Optional. The tag UUID list. | 3.4.0 | |
| systemTags | List | body | Optional. The system tags. | 3.4.0 | |
| userTags | List | body | Optional. The user tags. | 3.4.0 |
API Response
Sample
Response
{
"inventory": {
"uuid": "d82d2b6108b0331b90161b939987e5ae",
"areaId": "1",
"type": "Stub",
"authentication": "Plaintext",
"password": "password",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| 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.4.0 |
| inventory | RouterAreaInventory | See inventory. | 3.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. | 3.4.0 |
| description | String | The brief description of the error. | 3.4.0 |
| details | String | The details about the error. | 3.4.0 |
| elaboration | String | The reserved field. Default value: null. | 3.4.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 3.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. | 3.4.0 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 3.4.0 |
| areaId | String | 3.4.0 | |
| type | String | 3.4.0 | |
| authentication | String | 3.4.0 | |
| password | String | 3.4.0 | |
| keyId | Integer | 3.4.0 | |
| createDate | Timestamp | The creation date. | 3.4.0 |
| lastOpDate | Timestamp | The last operation date. | 3.4.0 |
SDK Sample
Java
SDK
CreateVRouterOspfAreaAction action = new CreateVRouterOspfAreaAction();
action.areaId = "1.1.1.1";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateVRouterOspfAreaAction.Result res = action.call();Python
SDK
CreateVRouterOspfAreaAction action = CreateVRouterOspfAreaAction()
action.areaId = "1.1.1.1"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateVRouterOspfAreaAction.Result res = action.call()DeleteVRouterOspfArea
API Request
URLs
DELETE zstack/v1/routerArea/{uuid}Headers
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/routerArea/8c7d2c714e1231549dd2a66a3f140ae5Request Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The resource UUID. | 3.4.0 | |
| deleteMode | String | body | Optional. The delete mode. | 3.4.0 | |
| systemTags | List | body | Optional. The system tags. | 3.4.0 | |
| userTags | List | body | Optional. The user tags. | 3.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
DeleteVRouterOspfAreaAction action = new DeleteVRouterOspfAreaAction();
action.uuid = "8c7d2c714e1231549dd2a66a3f140ae5";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteVRouterOspfAreaAction.Result res = action.call();Python
SDK
DeleteVRouterOspfAreaAction action = DeleteVRouterOspfAreaAction()
action.uuid = "8c7d2c714e1231549dd2a66a3f140ae5"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteVRouterOspfAreaAction.Result res = action.call()GetVRouterOspfNeighbor
API Request
URLs
GET zstack/v1/routerArea/{vRouterUuid}/neighborHeaders
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/routerArea/dfb6151287b632599becfc5716b8c374/neighborRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| vRouterUuid | String | url | The vRouter UUID. | 3.4.0 | |
| systemTags | List | query | Optional. The system tags. | 3.4.0 | |
| userTags | List | query | Optional. The user tags. | 3.4.0 |
API Response
Sample Response
{
"neighbors": [
null,
null
]
}| 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.4.0 |
| neighbors | List | See neighbors. | 3.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. | 3.4.0 |
| description | String | The brief description of the error. | 3.4.0 |
| details | String | The details about the error. | 3.4.0 |
| elaboration | String | The reserved field. Default value: null. | 3.4.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 3.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. | 3.4.0 |
#neighbors
| Name | Type | Description | Starting Version |
|---|---|---|---|
| id | String | 3.4.0 | |
| priority | String | 3.4.0 | |
| state | String | 3.4.0 | |
| deadTime | String | 3.4.0 | |
| neighborAddress | String | 3.4.0 | |
| device | String | 3.4.0 |
SDK Sample
Java
SDK
GetVRouterOspfNeighborAction action = new GetVRouterOspfNeighborAction();
action.vRouterUuid = "dfb6151287b632599becfc5716b8c374";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetVRouterOspfNeighborAction.Result res = action.call();Python
SDK
GetVRouterOspfNeighborAction action = GetVRouterOspfNeighborAction()
action.vRouterUuid = "dfb6151287b632599becfc5716b8c374"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetVRouterOspfNeighborAction.Result res = action.call()QueryVRouterOspfArea
API Request
URLs
GET zstack/v1/routerArea
GET zstack/v1/routerArea/{uuid}Headers
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/routerArea?q=areaId=1.1.1.1curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/routerArea/aba25a3e8e0e3b46bcb48042812eb38dQueryable Fields
You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryVRouterOspfArea, and pressing the Tab key.
API Response
Sample
Response
{
"inventories": [
{
"uuid": "24b7fb05b43538238f2071c81255fb35",
"areaId": "1",
"type": "Standard",
"authentication": "None",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}| 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.4.0 |
| inventories | List | See inventories. | 3.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. | 3.4.0 |
| description | String | The brief description of the error. | 3.4.0 |
| details | String | The details about the error. | 3.4.0 |
| elaboration | String | The reserved field. Default value: null. | 3.4.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 3.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. | 3.4.0 |
#inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 3.4.0 |
| areaId | String | 3.4.0 | |
| type | String | 3.4.0 | |
| authentication | String | 3.4.0 | |
| password | String | 3.4.0 | |
| keyId | Integer | 3.4.0 | |
| createDate | Timestamp | The creation date. | 3.4.0 |
| lastOpDate | Timestamp | The last operation date. | 3.4.0 |
SDK Sample
Java
SDK
QueryVRouterOspfAreaAction action = new QueryVRouterOspfAreaAction();
action.conditions = asList("areaId=1.1.1.1");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryVRouterOspfAreaAction.Result res = action.call();Python
SDK
QueryVRouterOspfAreaAction action = QueryVRouterOspfAreaAction()
action.conditions = ["areaId=1.1.1.1"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryVRouterOspfAreaAction.Result res = action.call()GetVRouterRouterId
API Request
URLs
GET zstack/v1/routerArea/{vRouterUuid}/routeridHeaders
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/routerArea/9b8b08cd553c3fd1ba4efc3e6c98512d/routerid?Request Parameters
Note:
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| vRouterUuid | String | url | The vRouter UUID. | 3.4.0 | |
| systemTags | List | query | Optional. The system tags. | 3.4.0 | |
| userTags | List | query | Optional. The user tags. | 3.4.0 |
Note:
- When you obtain a router ID in ZStack Cloud, you
can obtain the routerID of the router in OSPF by adding the
routeProtocolRouterId option to SystemTags.
- Format of the routeProtocolRouterId option:
routeProtocolRouterId::xxxx - Example:
routeProtocolRouterId::1.1.1.1
- Format of the routeProtocolRouterId option:
API Response
Sample Response
{
"routerId": "10.10.10.1"
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| routerId | String | 3.4.0 | |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 3.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. | 3.4.0 |
| description | String | The brief description of the error. | 3.4.0 |
| details | String | The details about the error. | 3.4.0 |
| elaboration | String | The reserved field. Default value: null. | 3.4.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 3.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. | 3.4.0 |
SDK Sample
Java
SDK
GetVRouterRouterIdAction action = new GetVRouterRouterIdAction();
action.vRouterUuid = "9b8b08cd553c3fd1ba4efc3e6c98512d";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetVRouterRouterIdAction.Result res = action.call();Python
SDK
GetVRouterRouterIdAction action = GetVRouterRouterIdAction()
action.vRouterUuid = "9b8b08cd553c3fd1ba4efc3e6c98512d"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetVRouterRouterIdAction.Result res = action.call()SetVRouterRouterId
API Request
URLs
POST zstack/v1/routerArea/{vRouterUuid}/routeridHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"routerId": "10.10.10.1"
},
"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":{"routerId":"10.10.10.1"}}' http://localhost:8080/zstack/v1/routerArea/7b579cbb55f73f62a5afcfe83c823b7b/routeridRequest Parameters
Note:
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| vRouterUuid | String | url | The vRouter UUID. | 3.4.0 | |
| routerId | String | body (contained in the params structure) | The router ID in IP address format. | 3.4.0 | |
| systemTags | List | body | Optional. The system tags. | 3.4.0 | |
| userTags | List | body | Optional. The user tags. | 3.4.0 |
Note:
- When you set a router ID in ZStack Cloud, you can
use the routerID of the router in OSPF by adding the
routeProtocolRouterId option to SystemTags.
- Format of the routeProtocolRouterId option:
routeProtocolRouterId::xxxx - Example:
routeProtocolRouterId::1.1.1.1
- Format of the routeProtocolRouterId option:
API Response
Sample Response
{
"routerId": "10.10.10.1"
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| routerId | String | 3.4.0 | |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 3.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. | 3.4.0 |
| description | String | The brief description of the error. | 3.4.0 |
| details | String | The details about the error. | 3.4.0 |
| elaboration | String | The reserved field. Default value: null. | 3.4.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 3.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. | 3.4.0 |
SDK Sample
Java
SDK
SetVRouterRouterIdAction action = new SetVRouterRouterIdAction();
action.vRouterUuid = "7b579cbb55f73f62a5afcfe83c823b7b";
action.routerId = "10.10.10.1";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SetVRouterRouterIdAction.Result res = action.call();Python
SDK
SetVRouterRouterIdAction action = SetVRouterRouterIdAction()
action.vRouterUuid = "7b579cbb55f73f62a5afcfe83c823b7b"
action.routerId = "10.10.10.1"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SetVRouterRouterIdAction.Result res = action.call()AddVRouterNetworksToOspfArea
API Request
URLs
POST zstack/v1/routerArea/{routerAreaUuid}/router/{vRouterUuid}/addnetworksHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"l3NetworkUuids": [
"080a5356667a34e3bda18a157e3743ec"
]
},
"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":{"l3NetworkUuids":["080a5356667a34e3bda18a157e3743ec"]}}' http://localhost:8080/zstack/v1/routerArea/2785aa6a32603b7a8a24b5a143975123/router/beaad9552cd531b7b59c631d0b0f7eb9/addnetworksRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| routerAreaUuid | String | url | The router area UUID. | 3.4.0 | |
| vRouterUuid | String | url | The VPC vRouter UUID. | 3.4.0 | |
| l3NetworkUuids | List | body (contained in the params structure) | The L3 network UUID. | 3.4.0 | |
| resourceUuid | String | body (contained in the params structure) | Optional. The resource UUID. | 3.4.0 | |
| tagUuids | List | body (contained in the params structure) | Optional. The tag UUID list. | 3.4.0 | |
| systemTags | List | body | Optional. The vRouter system tags. | 3.4.0 | |
| userTags | List | body | Optional. The vRouter user tags. | 3.4.0 |
API Response
Sample
Response
{
"inventory": {
"dns": [
{
"vpcRouterUuid": "acc537da2e003f349ed4cd9cf53eaab4",
"dns": "8.8.8.8"
}
],
"routerAreaRef": [
{
"uuid": "b3a4930e15fa358b9a2943b320ecf886",
"vRouterUuid": "b02959e102353bfd9fd14a149fa20565",
"routerAreaUuid": "d397110ba793345797e33bc6ed3db65f",
"l3NetworkUuid": "202258e4c4893f85a6b5baa7b8b55bb0",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"applianceVmType": "vpcvrouter",
"managementNetworkUuid": "b877c7f5faca31c2a31575a70352ebc8",
"status": "Connected",
"agentPort": 7272.0,
"uuid": "acc537da2e003f349ed4cd9cf53eaab4",
"name": "TestVPC",
"description": "this is a vpc for test",
"zoneUuid": "6ccc1079e90737768bf679ce611f9fe7",
"clusterUuid": "b15eecfa47083749811d79e2780f6f91",
"imageUuid": "15790865172133e1b8a2d7a1374d5732",
"hostUuid": "d332dc4237c332adbc2079bdb904ca36",
"lastHostUuid": "8d79aaec39033ed89facfb3089715d31",
"instanceOfferingUuid": "274cf5e3e2123fb1a7309ca9273d1436",
"rootVolumeUuid": "7dc7594d739c39a5ab89806e96b722f6",
"platform": "Linux",
"defaultL3NetworkUuid": "5c8c85ba45c83490b2cf8db490f483c0",
"type": "ApplianceVm",
"hypervisorType": "KVM",
"memorySize": 8.589934592E9,
"cpuNum": 4.0,
"allocatorStrategy": "LastHostPreferredAllocatorStrategy",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM",
"state": "Running",
"vmNics": [
{
"uuid": "72cc686cd7b83b53aad2036b99a84c07",
"vmInstanceUuid": "acc537da2e003f349ed4cd9cf53eaab4",
"usedIpUuid": "92683b734202356d8fa8e6cb7447b4e1",
"l3NetworkUuid": "69c3dba93a423bf4a1cecbd86da9261b",
"ip": "192.168.1.10",
"mac": "00:0c:29:bd:99:fc",
"hypervisorType": "KVM",
"netmask": "255.255.255.0",
"gateway": "192.168.1.1",
"deviceId": 0.0,
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"allVolumes": [
{
"uuid": "7dc7594d739c39a5ab89806e96b722f6",
"name": "Root-Volume-For-VM-acc537da2e003f349ed4cd9cf53eaab4",
"primaryStorageUuid": "5d93dbda7e4e386891657de613d9a28d",
"vmInstanceUuid": "acc537da2e003f349ed4cd9cf53eaab4",
"diskOfferingUuid": "52bc981286ea3087b9969e47aa520fac",
"rootImageUuid": "15790865172133e1b8a2d7a1374d5732",
"installPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-7dc7594d739c39a5ab89806e96b722f6/7dc7594d739c39a5ab89806e96b722f6.qcow2",
"type": "Root",
"format": "qcow2",
"size": 1.073741824E11,
"actualSize": 2.147483648E10,
"deviceId": 0.0,
"state": "Enabled",
"status": "Ready",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}
}| 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.4.0 |
| inventory | VpcRouterVmInventory | See inventory. | 3.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. | 3.4.0 |
| description | String | The brief description of the error. | 3.4.0 |
| details | String | The details about the error. | 3.4.0 |
| elaboration | String | The reserved field. Default value: null. | 3.4.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 3.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. | 3.4.0 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| publicNetworkUuid | String | 3.4.0 | |
| virtualRouterVips | List | 3.4.0 | |
| applianceVmType | String | 3.4.0 | |
| managementNetworkUuid | String | 3.4.0 | |
| defaultRouteL3NetworkUuid | String | 3.4.0 | |
| status | String | 3.4.0 | |
| agentPort | Integer | 3.4.0 | |
| uuid | String | The resource UUID. | 3.4.0 |
| name | String | The resource name. | 3.4.0 |
| description | String | The detailed description of the resource. | 3.4.0 |
| zoneUuid | String | The zone UUID. | 3.4.0 |
| clusterUuid | String | The cluster UUID. | 3.4.0 |
| imageUuid | String | The image UUID. | 3.4.0 |
| hostUuid | String | The host UUID. | 3.4.0 |
| lastHostUuid | String | 3.4.0 | |
| instanceOfferingUuid | String | The instance offering UUID. | 3.4.0 |
| rootVolumeUuid | String | The root volume UUID. | 3.4.0 |
| platform | String | 3.4.0 | |
| defaultL3NetworkUuid | String | 3.4.0 | |
| type | String | 3.4.0 | |
| hypervisorType | String | 3.4.0 | |
| memorySize | Long | 3.4.0 | |
| cpuNum | Integer | 3.4.0 | |
| cpuSpeed | Long | 3.4.0 | |
| allocatorStrategy | String | 3.4.0 | |
| createDate | Timestamp | The creation date. | 3.4.0 |
| lastOpDate | Timestamp | The last operation date. | 3.4.0 |
| state | String | 3.4.0 | |
| dns | List | See dns. | 3.4.0 |
| routerAreaRef | List | See routerAreaRef. | 3.4.0 |
| vmNics | List | See vmNics. | 3.4.0 |
| allVolumes | List | See allVolumes. | 3.4.0 |
| vmCdRoms | List | See vmCdRoms. | 3.4.0 |
#dns
| Name | Type | Description | Starting Version |
|---|---|---|---|
| id | Long | 3.4.0 | |
| vpcRouterUuid | String | 3.4.0 | |
| dns | String | 3.4.0 | |
| createDate | Timestamp | The creation date. | 3.4.0 |
| lastOpDate | Timestamp | The last operation date. | 3.4.0 |
#routerAreaRef
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 3.4.0 |
| vRouterUuid | String | 3.4.0 | |
| routerAreaUuid | String | 3.4.0 | |
| l3NetworkUuid | String | The L3 network UUID. | 3.4.0 |
| createDate | Timestamp | The creation date. | 3.4.0 |
| lastOpDate | Timestamp | The last operation date. | 3.4.0 |
#vmNics
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 3.4.0 |
| vmInstanceUuid | String | The VM instance UUID. | 3.4.0 |
| l3NetworkUuid | String | The L3 network UUID. | 3.4.0 |
| ip | String | 3.4.0 | |
| mac | String | 3.4.0 | |
| hypervisorType | String | 3.4.0 | |
| netmask | String | 3.4.0 | |
| gateway | String | 3.4.0 | |
| metaData | String | 3.4.0 | |
| ipVersion | Integer | 3.4.0 | |
| deviceId | Integer | 3.4.0 | |
| createDate | Timestamp | The creation date. | 3.4.0 |
| lastOpDate | Timestamp | The last operation date. | 3.4.0 |
| usedIps | List | See usedIps. | 3.4.0 |
#usedIps
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 3.4.0 |
| ipRangeUuid | String | The IP range UUID. | 3.4.0 |
| l3NetworkUuid | String | The L3 network UUID. | 3.4.0 |
| ipVersion | Integer | 3.4.0 | |
| ip | String | 3.4.0 | |
| netmask | String | 3.4.0 | |
| gateway | String | 3.4.0 | |
| usedFor | String | 3.4.0 | |
| ipInLong | long | 3.4.0 | |
| vmNicUuid | String | The VM NIC UUID. | 3.4.0 |
| createDate | Timestamp | The creation date. | 3.4.0 |
| lastOpDate | Timestamp | The last operation date. | 3.4.0 |
#allVolumes
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 3.4.0 |
| name | String | The resource name. | 3.4.0 |
| description | String | The detailed description of the resource. | 3.4.0 |
| primaryStorageUuid | String | The primary storage UUID. | 3.4.0 |
| vmInstanceUuid | String | The VM instance UUID. | 3.4.0 |
| diskOfferingUuid | String | The disk offering UUID. | 3.4.0 |
| rootImageUuid | String | 3.4.0 | |
| installPath | String | 3.4.0 | |
| type | String | 3.4.0 | |
| format | String | 3.4.0 | |
| size | Long | 3.4.0 | |
| actualSize | Long | 3.4.0 | |
| deviceId | Integer | 3.4.0 | |
| state | String | 3.4.0 | |
| status | String | 3.4.0 | |
| createDate | Timestamp | The creation date. | 3.4.0 |
| lastOpDate | Timestamp | The last operation date. | 3.4.0 |
| isShareable | Boolean | 3.4.0 | |
| volumeQos | String | 3.4.0 |
#vmCdRoms
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 3.4.0 |
| vmInstanceUuid | String | The VM instance UUID. | 3.4.0 |
| deviceId | Integer | 3.4.0 | |
| isoUuid | String | 3.4.0 | |
| isoInstallPath | String | 3.4.0 | |
| name | String | The resource name. | 3.4.0 |
| description | String | The detailed description of the resource. | 3.4.0 |
| createDate | Timestamp | The creation date. | 3.4.0 |
| lastOpDate | Timestamp | The last operation date. | 3.4.0 |
SDK Sample
Java
SDK
AddVRouterNetworksToOspfAreaAction action = new AddVRouterNetworksToOspfAreaAction();
action.routerAreaUuid = "2785aa6a32603b7a8a24b5a143975123";
action.vRouterUuid = "beaad9552cd531b7b59c631d0b0f7eb9";
action.l3NetworkUuids = asList("080a5356667a34e3bda18a157e3743ec");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddVRouterNetworksToOspfAreaAction.Result res = action.call();Python
SDK
AddVRouterNetworksToOspfAreaAction action = AddVRouterNetworksToOspfAreaAction()
action.routerAreaUuid = "2785aa6a32603b7a8a24b5a143975123"
action.vRouterUuid = "beaad9552cd531b7b59c631d0b0f7eb9"
action.l3NetworkUuids = [080a5356667a34e3bda18a157e3743ec]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddVRouterNetworksToOspfAreaAction.Result res = action.call()RemoveVRouterNetworksFromOspfArea
API Request
URLs
DELETE zstack/v1/routerArea/networksHeaders
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/routerArea/networks?Request Parameters
| Name | Description | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| uuids | List | body | The UUID in the network area table. | 3.4.0 | |
| deleteMode | String | body | Optional. The delete mode. | 3.4.0 | |
| systemTags | List | body | Optional. The system tags. | 3.4.0 | |
| userTags | List | body | Optional. The user tags. | 3.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
RemoveVRouterNetworksFromOspfAreaAction action = new RemoveVRouterNetworksFromOspfAreaAction();
action.uuids = asList("ad747eefbaf534d4a46822cc02fd329a");
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RemoveVRouterNetworksFromOspfAreaAction.Result res = action.call();Python
SDK
RemoveVRouterNetworksFromOspfAreaAction action = RemoveVRouterNetworksFromOspfAreaAction()
action.uuids = [ad747eefbaf534d4a46822cc02fd329a]
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
RemoveVRouterNetworksFromOspfAreaAction.Result res = action.call()UpdateVRouterOspfArea
API Request
URLs
PUT zstack/v1/routerArea/{uuid}/actionsHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"updateVRouterOspfArea": {
"areaType": "Standard"
},
"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 '{"updateVRouterOspfArea":{"areaType":"Standard"}}' http://localhost:8080/zstack/v1/routerArea/35bc0bb59575326c822b07a945b48a51/actionsRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The resource UUID. | 3.4.0 | |
| areaAuth | String | body (contained in the updateVRouterOspfArea structure) | Optional. The area authentication mode. | 3.4.0 | |
| areaType | String | body (contained in the updateVRouterOspfArea structure) | Optional. The area type. | 3.4.0 | |
| password | String | body (contained in the updateVRouterOspfArea structure) | Optional. The password that is used for area authentication. | 3.4.0 | |
| keyId | Integer | body (contained in the updateVRouterOspfArea structure) | Optional. The key ID that is used for area authentication. | 3.4.0 | |
| systemTags | List | body | Optional. The system tags. | 3.4.0 | |
| userTags | List | body | Optional. The user tags. | 3.4.0 |
API Response
Sample
Response
{
"inventory": {
"uuid": "b90552421b6a390fa55da5b489a53e32",
"areaId": "1",
"type": "Stub",
"authentication": "MD5",
"keyId": 128.0,
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| 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.4.0 |
| inventory | RouterAreaInventory | See inventory. | 3.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. | 3.4.0 |
| description | String | The brief description of the error. | 3.4.0 |
| details | String | The details about the error. | 3.4.0 |
| elaboration | String | The reserved field. Default value: null. | 3.4.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 3.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. | 3.4.0 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 3.4.0 |
| areaId | String | 3.4.0 | |
| type | String | 3.4.0 | |
| authentication | String | 3.4.0 | |
| password | String | 3.4.0 | |
| keyId | Integer | 3.4.0 | |
| createDate | Timestamp | The creation date. | 3.4.0 |
| lastOpDate | Timestamp | The last operation date. | 3.4.0 |
SDK Sample
Java
SDK
UpdateVRouterOspfAreaAction action = new UpdateVRouterOspfAreaAction();
action.uuid = "35bc0bb59575326c822b07a945b48a51";
action.areaType = "Standard";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateVRouterOspfAreaAction.Result res = action.call();Python
SDK
UpdateVRouterOspfAreaAction action = UpdateVRouterOspfAreaAction()
action.uuid = "35bc0bb59575326c822b07a945b48a51"
action.areaType = "Standard"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateVRouterOspfAreaAction.Result res = action.call()QueryVRouterOspfNetwork
API Request
URLs
GET zstack/v1/routerArea/network
GET zstack/v1/routerArea/networkR/{uuid}Headers
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/routerArea/network?curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/routerArea/networkR/cbdc3b6f584539508a95f2fe8fc0d6bbQueryable Fields
You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryVRouterOspfNetwork, and pressing the Tab key.
API Response
Sample
Response
{
"inventories": [
{
"uuid": "fb2a103989cd3ad581c3ad6931765a2e",
"vRouterUuid": "2449c7b9976c301bb5917cf25e021e65",
"routerAreaUuid": "e53cb89baf223faf9b2683752c80a3a5",
"l3NetworkUuid": "937b798289cf30bf884600143b5dfc0d",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}| 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.4.0 |
| inventories | List | See inventories. | 3.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. | 3.4.0 |
| description | String | The brief description of the error. | 3.4.0 |
| details | String | The details about the error. | 3.4.0 |
| elaboration | String | The reserved field. Default value: null. | 3.4.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 3.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. | 3.4.0 |
#inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 3.4.0 |
| vRouterUuid | String | 3.4.0 | |
| routerAreaUuid | String | 3.4.0 | |
| l3NetworkUuid | String | The L3 network UUID. | 3.4.0 |
| createDate | Timestamp | The creation date. | 3.4.0 |
| lastOpDate | Timestamp | The last operation date. | 3.4.0 |
SDK Sample
Java
SDK
QueryVRouterOspfNetworkAction action = new QueryVRouterOspfNetworkAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryVRouterOspfNetworkAction.Result res = action.call();Python
SDK
QueryVRouterOspfNetworkAction action = QueryVRouterOspfNetworkAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryVRouterOspfNetworkAction.Result res = action.call()