Module openstack_sdk::api::network::v2::router::add_external_gateways

source ·
Expand description

Add external gateways to a router in addition to the ones it already has.

Multiple gateways attached to the same network can be added to the same router.

The add/update/remove external gateways operations extend the use of router.external_gateway_info to manage multiple external gateways. The full set of external gateways is exposed in the read-only router.external_gateways parameter. router.external_gateways contains a list of external_gateway_info structures like:

The first item (index 0) of the external_gateways list is special if a router does not have any gateway ports yet:

The order of the the rest of the list (indexes 1, 2, …) is irrelevant and ignored.

The first external gateway can be managed in two ways: via router.external_gateway_info or via add/update/remove_external_gateways. The other external gateways can only be managed via add/update/remove_external_gateways.

The format of the request body is the same as the format of the read-only router.external_gateways parameter, but wrapped as follows:

The response codes and response body are the same as to the update of the router. That is the whole router object is returned including the external_gateway_info and external_gateways parameters which represents the result of the operation.

Changes in router.external_gateway_info are reflected in router.external_gateways and vice versa. Updating external_gateway_info also updates the first element of external_gateways and it leaves the rest of external_gateways unchanged. Setting external_gateway_info to an empty value removes a single gateway and one of the extra gateways takes its place instead.

Normal response codes: 200

Error response codes: 400, 401, 404, 412

Structs§

Enums§