• SAP HANA

saphana
  1. Help Center
  2. SAP HANA
  3. User Guide (API)
  4. Creating a HANA ECS
  5. Creating a Router

Creating a Router

Before preparing network resources using APIs, you must create a router. The network is reachable only after you configure its subnets on the router.

Parameters

[1] Router

Attribute

Type

CRUD

Default Value

Restriction

Description

id

Uuid-str

R

Automatically generated

N/A

Router ID

name

String (64)

CRU

Empty

N/A

Router name

The name can consist of only digits, letters, underscores (_), and hyphens (-).

admin_state_up

Bool

CRU

True

True or false

Administrative status

The value can only be True.

status

String

R

N/A

N/A

Status, which can be ACTIVEDOWN, or ERROR

tenant_id

String (255)

CR

N/A

N/A

Tenant ID. Only the administrator can specify the tenant_id of other tenants.

external_gateway_info

Dict

CRU

N/A

N/A

Extended attribute, which specifies the external gateway. For details, see the external_gateway_info table.

routes

List (route)

RU

N/A

N/A

Extended attribute, which specifies a route list. For details, see the route table.

No static routes are supported.

distributed

Bool

CRU

False

True or false

Distributed deployment mode

Administrator rights are required.

ha

Bool

CR

False

True or false

HA deployment mode

Administrator rights are required.

[2] external_gateway_info

Attribute

Type

CRUD

Default Value

Restriction

Description

network_id

Uuid-str

CRU

N/A

N/A

External network UUID

To query the information of an external network, set GET /v2.0/networks?router:external=True or use neutron net-external-list.

enabled_snat

Bool

CRU

N/A

N/A

Whether to enable SNAT

Administrator rights are required.

external_fixed_ips

List (external_fixed_ip)

CRU

Empty

N/A

IP address. For details, see the external_fixed_ip table.

This field is not supported.

[3] external_fixed_ip

Attribute

Type

CRUD

Default Value

Restriction

Description

subnet_id

Uuid-Str

CRU

N/A

N/A

Subnet

ip

String

CRU

N/A

N/A

IP address

[4] Route

Attribute

Type

CRUD

Default Value

Restriction

Description

destination

String

RU

N/A

The prefix cannot be repetitive with the direct route.

IP address segment, for example, 135.207.0.0/16

nexthop

String

RU

N/A

N/A

IP address of the next hop

API Format

Method

URI

Description

POST

/v2.0/routers

Creates a router.

Request Parameters

Parameter

Type

Mandatory or Not

Description

router

Dict

Yes

Specifies a router. For details, see the router table.

Mandatory field: none

Only the name requires configuration.

Response Parameters

Parameter

Type

Mandatory or Not

Description

router

Dict

Yes

Specifies a router. For details, see the router table.

Request Example

POST /v2.0/routers
{
   "router": {
     "name": "router2"
   }
}

Response Example

{
    "router": {
        "status": "ACTIVE",
        "external_gateway_info": {
          "network_id": "9daeac7c-a98f-430f-8e38-67f9c044e299" 
    }
    "name": "router2",
    "admin_state_up": true,
    "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
    "id": "76e48ca6-7d2d-45a6-947b-e48969a6035b",
    "distributed": false,
    "ha": false
    }
}