• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Router
  6. Router API Overview

Router API Overview

Object Introduction

This interface is used to manage and perform operations on router resources, including querying routers, creating a router, querying a specified router, deleting a router, and updating a router.

Response Parameter

Table 1 router object

Attribute

Mandatory

Type

CRUD

Default Value

Constraint

Description

id

Yes

Uuid-str

R

Automatically generated

N/A

Specifies the router ID.

This parameter is not mandatory when you query routers.

name

No

String(64)

CRU

None

N/A

Specifies the router name.

The name can contain only letters, digits, underscores (_), hyphens (-), and periods (.).

admin_state_up

No

Bool

CRU

true

The value can only be true or false.

Specifies the administrative status.

The value can only be true.

status

No

String

R

N/A

N/A

Specifies the router status. The value can be ACTIVE, DOWN, or ERROR.

tenant_id

No

String(255)

R

N/A

N/A

Specifies the project ID.

external_gateway_info

No

Dict

CRU

N/A

N/A

Specifies the external gateway information. This is an extended attribute. For details, see Table 2.

routes

No

List(route)

RU

N/A

N/A

Specifies information about the routes. This is an extended attribute. For details, see Table 3.

project_id

No

String(64)

R

N/A

N/A

Specifies the project ID of a resource.

created_at

No

String(64)

R

Automatically generated

N/A

Specifies the time when the resource was created.

updated_at

No

String(64)

R

Automatically generated

N/A

Specifies the time when the resource was updated.

Table 2 external_gateway_info object

Attribute

Type

CRUD

Default Value

Constraint

Description

network_id

Uuid-str

CRU

N/A

N/A

Specifies the UUID of the external network.

You can use GET /v2.0/networks?router:external=True or run the neutron net-external-list command to query information about the external network.

enable_snat

Bool

CRU

N/A

N/A

Specifies whether the SNAT function is enabled.

The default value is false.

Table 3 route object

Attribute

Type

CRUD

Default Value

Constraint

Description

destination

String

RU

N/A

The prefix cannot be the same as that of a direct route.

Specifies the IP address range.

nexthop

String

RU

N/A

N/A

Specifies the next hop IP address. The IP address can only be one in the subnet associated with the router.