openstack.network.v2.bgp_speaker¶
The BgpSpeaker Class¶
The BgpSpeaker
class inherits from Resource
.
-
class
openstack.network.v2.bgp_speaker.
BgpSpeaker
(_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.
-
id
¶ The Id of the BGP Speaker
-
name
¶ The BGP speaker’s name.
-
project_id
¶ The ID of the project that owns the BGP Speaker.
-
tenant_id
¶ Tenant_id (deprecated attribute).
-
ip_version
¶ The IP version (4 or 6) of the BGP Speaker.
-
advertise_floating_ip_host_routes
¶ Whether to enable or disable the advertisement of floating ip host routes by the BGP Speaker. True by default.
-
advertise_tenant_networks
¶ Whether to enable or disable the advertisement of tenant network routes by the BGP Speaker. True by default.
-
local_as
¶ The local Autonomous System number of the BGP Speaker.
-
networks
¶ The ID of the network to which the BGP Speaker is associated.
-
add_bgp_peer
(session, peer_id)¶ Add BGP Peer to a BGP Speaker
- Parameters
session (
Adapter
) – The session to communicate through.peer_id – id of the peer to associate with the speaker.
- Returns
A dictionary as the API Reference describes it.
- Raises
SDKException
on error.
-
remove_bgp_peer
(session, peer_id)¶ Remove BGP Peer from a BGP Speaker
- Parameters
session (
Adapter
) – The session to communicate through.peer_id – The ID of the peer to disassociate from the speaker.
- Raises
SDKException
on error.
-
add_gateway_network
(session, network_id)¶ Add Network to a BGP Speaker
- Param
session: The session to communicate through.
- Parameters
network_id – The ID of the network to associate with the speaker
- Returns
A dictionary as the API Reference describes it.
-
remove_gateway_network
(session, network_id)¶ Delete Network from a BGP Speaker
- Parameters
session (
Adapter
) – The session to communicate through.network_id – The ID of the network to disassociate from the speaker
-
get_advertised_routes
(session)¶ List routes advertised by a BGP Speaker
- Parameters
session (
Adapter
) – The session to communicate through.- Returns
The response as a list of routes (cidr/nexthop pair advertised by the BGP Speaker.
- Raises
SDKException
on error.
-
get_bgp_dragents
(session)¶ List Dynamic Routing Agents hosting a specific BGP Speaker
- Parameters
session (
Adapter
) – The session to communicate through.- Returns
The response as a list of dragents hosting a specific BGP Speaker.
- Raises
SDKException
on error.
-
add_bgp_speaker_to_dragent
(session, bgp_agent_id)¶ Add BGP Speaker to a Dynamic Routing Agent
- Parameters
session (
Adapter
) – The session to communicate through.bgp_agent_id – The id of the dynamic routing agent to which add the speaker.
-
remove_bgp_speaker_from_dragent
(session, bgp_agent_id)¶ Delete BGP Speaker from a Dynamic Routing Agent
- Parameters
session (
Adapter
) – The session to communicate through.bgp_agent_id – The id of the dynamic routing agent from which remove the speaker.