openstack.network.v2.router¶
The Router Class¶
The Router
class inherits from Resource
.
- class openstack.network.v2.router.Router(_synchronized=False, connection=None, **attrs)¶
The base resource
- Parameters
_synchronized (bool) – This is not intended to be used directly. See
new()
andexisting()
.connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of
self._connection
in Resource code should protect itself with a check for None.
- availability_zone_hints¶
Availability zone hints to use when scheduling the router. Type: list of availability zone names
- availability_zones¶
Availability zones for the router. Type: list of availability zone names
- created_at¶
Timestamp when the router was created.
- description¶
The router description.
- enable_ndp_proxy¶
The ndp proxy state of the router
- external_gateway_info¶
The
network_id
, for the external gateway. Type: dict
- flavor_id¶
The ID of the flavor.
- is_admin_state_up¶
The administrative state of the router, which is up
True
or downFalse
. Type: bool
- is_distributed¶
The distributed state of the router, which is distributed
True
or notFalse
. Type: bool
- is_ha¶
The highly-available state of the router, which is highly available
True
or notFalse
. Type: bool
- name¶
The router name.
- project_id¶
The ID of the project this router is associated with.
- tenant_id¶
Tenant_id (deprecated attribute).
- revision_number¶
Revision number of the router. Type: int
- routes¶
The extra routes configuration for the router.
- status¶
The router status.
- updated_at¶
Timestamp when the router was created.
- add_interface(session, **body)¶
Add an internal interface to a logical router.
- Parameters
session (
Adapter
) – The session to communicate through.body (dict) – The body requested to be updated on the router
- Returns
The body of the response as a dictionary.
- Raises
SDKException
on error.
- remove_interface(session, **body)¶
Remove an internal interface from a logical router.
- Parameters
session (
Adapter
) – The session to communicate through.body (dict) – The body requested to be updated on the router
- Returns
The body of the response as a dictionary.
- Raises
SDKException
on error.
- add_extra_routes(session, body)¶
Add extra routes to a logical router.
- Parameters
session (
Adapter
) – The session to communicate through.body (dict) – The request body as documented in the api-ref.
- Returns
The response as a Router object with the added extra routes.
- Raises
SDKException
on error.
- remove_extra_routes(session, body)¶
Remove extra routes from a logical router.
- Parameters
session (
Adapter
) – The session to communicate through.body (dict) – The request body as documented in the api-ref.
- Returns
The response as a Router object with the extra routes left.
- Raises
SDKException
on error.
- add_gateway(session, **body)¶
Add an external gateway to a logical router.
- Parameters
session (
Adapter
) – The session to communicate through.body (dict) – The body requested to be updated on the router
- Returns
The body of the response as a dictionary.
- remove_gateway(session, **body)¶
Remove an external gateway from a logical router.
- Parameters
session (
Adapter
) – The session to communicate through.body (dict) – The body requested to be updated on the router
- Returns
The body of the response as a dictionary.