Network ResourcesDistributed Port Group Related Interfaces
Remove Host Route from L3 Network
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/l3-networks/8648a70a245232c5a1bee9ae408419e5/hostroute?prefix=169.254.169.254/32Request Parameters
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| l3NetworkUuid | String | url | The Distributed Port Group UUID. | 2.3 | |
| prefix | String | body | 2.3 | ||
| systemTags (Optional) | List | body | 2.3 | ||
| userTags (Optional) | List | body | 2.3 |
API Response
Sample Response
{
"inventory": {
"name": "Test-L3Network",
"l2NetworkUuid": "15e1e6a016f43a5688ca3d3445076309",
"dns": []
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error | 2.3 |
| inventory | L3NetworkInventory | See inventory | 2.3 |
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 |
inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID, which uniquely identifies the resource. | 0.6 |
| name | String | The resource name. | 0.6 |
| description | String | The detailed description of the resource. | 0.6 |
| type | String | 0.6 | |
| zoneUuid | String | The Data Center UUID. | 0.6 |
| l2NetworkUuid | String | The port group Distributed Switch UUID. | 0.6 |
| state | String | 0.6 | |
| dnsDomain | String | 0.6 | |
| system | Boolean | 0.6 | |
| category | String | 0.6 | |
| ipVersion | Integer | The IP protocol number. | 3.1.0 |
| enableIPAM | Boolean | Enables IP address management. | 4.10.16 |
| createDate | Timestamp | The creation date. | 0.6 |
| lastOpDate | Timestamp | The last operation date. | 0.6 |
| dns | List | 0.6 | |
| ipRanges | List | See ipRanges | 0.6 |
| networkServices | List | See networkServices | 0.6 |
| hostRoute | List | See hostRoute | 2.3 |
| reservedIpRanges | List | See reservedIpRanges | 4.10.16 |
ipRanges
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID, which uniquely identifies the resource. | 0.6 |
| l3NetworkUuid | String | The Distributed Port Group UUID. | 0.6 |
| name | String | The resource name. | 0.6 |
| description | String | The detailed description of the resource. | 0.6 |
| startIp | String | 0.6 | |
| endIp | String | 0.6 | |
| netmask | String | 0.6 | |
| gateway | String | 0.6 | |
| networkCidr | String | 0.6 | |
| createDate | Timestamp | The creation date. | 0.6 |
| lastOpDate | Timestamp | The last operation date. | 0.6 |
networkServices
| Name | Type | Description | Starting Version |
|---|---|---|---|
| l3NetworkUuid | String | The Distributed Port Group UUID. | 0.6 |
| networkServiceProviderUuid | String | The network service provider UUID. | 0.6 |
| networkServiceType | String | 0.6 |
hostRoute
| Name | Type | Description | Starting Version |
|---|---|---|---|
| id | Long | 2.3 | |
| l3NetworkUuid | String | The Distributed Port Group UUID. | 2.3 |
| prefix | String | 2.3 | |
| nexthop | String | 2.3 | |
| createDate | Timestamp | The creation date. | 2.3 |
| lastOpDate | Timestamp | The last operation date. | 2.3 |
reservedIpRanges
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID, which uniquely identifies the resource. | 4.10.16 |
| l3NetworkUuid | String | The Distributed Port Group UUID. | 4.10.16 |
| name | String | The resource name. | 4.10.16 |
| description | String | The detailed description of the resource. | 4.10.16 |
| startIp | String | The start IP address (included in the reserved address range). | 4.10.16 |
| endIp | String | The end IP address (included in the reserved address range). | 4.10.16 |
| ipVersion | Integer | The IP protocol number. | 4.10.16 |
| createDate | Timestamp | The creation date. | 4.10.16 |
| lastOpDate | Timestamp | The last operation date. | 4.10.16 |
SDK Sample
Java SDK
RemoveHostRouteFromL3NetworkAction action = new RemoveHostRouteFromL3NetworkAction();
action.l3NetworkUuid = "8648a70a245232c5a1bee9ae408419e5";
action.prefix = "169.254.169.254/32";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RemoveHostRouteFromL3NetworkAction.Result res = action.call();Python SDK
action = RemoveHostRouteFromL3NetworkAction()
action.l3NetworkUuid = "8648a70a245232c5a1bee9ae408419e5"
action.prefix = "169.254.169.254/32"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()