octavia.amphorae.backends.agent.api_server package¶
Submodules¶
octavia.amphorae.backends.agent.api_server.amphora_info module¶
octavia.amphorae.backends.agent.api_server.certificate_update module¶
octavia.amphorae.backends.agent.api_server.haproxy_compatibility module¶
octavia.amphorae.backends.agent.api_server.keepalived module¶
octavia.amphorae.backends.agent.api_server.keepalivedlvs module¶
- class KeepalivedLvs[source]¶
- Bases: - LvsListenerApiServerBase- delete_lvs_listener(listener_id)[source]¶
- Delete a LVS Listener from a amphora - Parameters:
- listener_id – The id of the listener 
- Returns:
- HTTP response with status code. 
- Raises:
- Exception – If unsupported initial system of amphora. 
 
 - get_all_lvs_listeners_status()[source]¶
- Gets the status of all UDP listeners - Gets the status of all UDP listeners on the amphora. 
 - get_lvs_listener_config(listener_id)[source]¶
- Gets the keepalivedlvs config - Parameters:
- listener_id – the id of the listener 
 
 
octavia.amphorae.backends.agent.api_server.loadbalancer module¶
- class Loadbalancer[source]¶
- Bases: - object- get_all_listeners_status(other_listeners=None)[source]¶
- Gets the status of all listeners - This method will not consult the stats socket so a listener might show as ACTIVE but still be in ERROR - Currently type==SSL is also not detected 
 
octavia.amphorae.backends.agent.api_server.lvs_listener_base module¶
- class LvsListenerApiServerBase[source]¶
- Bases: - object- Base LVS Listener Server API - abstract delete_lvs_listener(listener_id)[source]¶
- Delete a LVS Listener from a amphora - Parameters:
- listener_id – The id of the listener 
- Returns:
- HTTP response with status code. 
- Raises:
- Exception – If unsupported initial system of amphora. 
 
 - abstract get_all_lvs_listeners_status()[source]¶
- Gets the status of all LVS Listeners - This method will not consult the stats socket so a listener might show as ACTIVE but still be in ERROR - Returns:
- a list of LVS Listener status 
- Raises:
- Exception – If the listener pid located directory is not exist 
 
 - abstract get_lvs_listener_config(listener_id)[source]¶
- Gets the LVS Listener configuration details - Parameters:
- listener_id – the id of the LVS Listener 
- Returns:
- HTTP response with status code. 
- Raises:
- Exception – If the listener is failed to find. 
 
 
octavia.amphorae.backends.agent.api_server.osutils module¶
octavia.amphorae.backends.agent.api_server.plug module¶
octavia.amphorae.backends.agent.api_server.rules_schema module¶
octavia.amphorae.backends.agent.api_server.server module¶
octavia.amphorae.backends.agent.api_server.util module¶
- get_backend_for_lb_object(object_id)[source]¶
- Returns the backend for a listener. - If the listener is a TCP based listener return ‘HAPROXY’. If the listener is a UDP or SCTP based listener return ‘LVS’ If the listener is not identifiable, return None. - Parameters:
- listener_id – The ID of the listener to identify. 
- Returns:
- HAPROXY_BACKEND, LVS_BACKEND or None 
 
- get_haproxy_vip_addresses(lb_id)[source]¶
- Get the VIP addresses for a load balancer. - Parameters:
- lb_id – The load balancer ID to get VIP addresses from. 
- Returns:
- List of VIP addresses (IPv4 and IPv6) 
 
- get_listeners()[source]¶
- Get Listeners - Returns:
- An array with the ids of all listeners, e.g. [‘123’, ‘456’, …] or [] if no listeners exist 
 
- get_loadbalancers()[source]¶
- Get Load balancers - Returns:
- An array with the uuids of all load balancers, e.g. [‘123’, ‘456’, …] or [] if no loadbalancers exist 
 
- get_lvs_vip_addresses(listener_id: str) list[str][source]¶
- Get the VIP addresses for a LVS load balancer. - Parameters:
- listener_id – The listener ID to get VIP addresses from. 
- Returns:
- List of VIP addresses (IPv4 and IPv6) 
 
- send_member_advertisements(fixed_ips: Iterable[Dict[str, str]])[source]¶
- Sends advertisements for each fixed_ip of a list - This method will send either GARP (IPv4) or neighbor advertisements (IPv6) for the addresses of the subnets of the members. - Parameters:
- fixed_ips – a list of dicts that contain ‘ip_address’ elements 
- Returns:
- None 
 
- send_vip_advertisements(lb_id: str | None = None, listener_id: str | None = None)[source]¶
- Sends address advertisements for each load balancer VIP. - This method will send either GARP (IPv4) or neighbor advertisements (IPv6) for the VIP addresses on a load balancer. - Parameters:
- lb_id – The load balancer ID to send advertisements for. 
- Returns:
- None 
 
