• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Routers
  6. Introduction

Introduction

Object

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

Object Model

Table 1 router object

Attribute

Type

CRUD

Default Value

Restriction

Description

id

UUID-str

R

Automatically generated

None

Specifies the router ID.

name

String(64)

CRU

None

None

Specifies a router name.

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

admin_state_up

Bool

CRU

true

true or false

Specifies the administrative status.

The value can only be true.

status

String

R

None

None

Specifies the status, which can be ACTIVEDOWN, or ERROR

tenant_id

String(255)

CR

None

None

Specifies the tenant ID. Only the administrator can specify tenant_id of other tenants.

external_gateway_info

Dict

CRU

None

None

Specifies the external gateway information. For details, see Table 2.

routes

List(route)

RU

None

None

Specifies information about the routes. For details, see Table 4.

distributed

Bool

CRU

false

true or false

Specifies the distributed deployment mode.

Administrator rights are required.

ha

Bool

CR

false

true or false

Specifies the HA deployment mode.

Administrator rights are required.

Table 2 external_gateway_info object

Attribute

Type

CRUD

Default Value

Restriction

Description

network_id

Uuid-str

CRU

None

None

Specifies the external network UUID.

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

None

None

Specifies whether to enable SNAT.

Administrator rights are required.

The value is false by default when you create a router. You can only update the value.

external_fixed_ips

List(external_fixed_ip)

CRU

None

None

Specifies the IP address. For details, see Table 3.

This field is not supported.

Table 3 external_fixed_ip object

Attribute

Type

CRUD

Default Value

Restriction

Description

subnet_id

Uuid-Str

CRU

None

None

Specifies the subnet.

ip

String

CRU

None

None

Specifies the IP address.

Table 4 Route object

Attribute

Type

CRUD

Default Value

Restriction

Description

destination

String

RU

None

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

Specifies the IP address segment. You can only configure the default route, and its value can only be 0.0.0.0/0.

nexthop

String

RU

None

None

Specifies the next hop IP address. You can configure an IP address in the subnets related to the router.