octavia.amphorae.backends.agent.api_server package

octavia.amphorae.backends.agent.api_server package

Submodules

octavia.amphorae.backends.agent.api_server.amphora_info module

class AmphoraInfo(osutils)[source]

Bases: object

compile_amphora_details()[source]
compile_amphora_info()[source]
get_interface(ip_addr)[source]

octavia.amphorae.backends.agent.api_server.certificate_update module

upload_server_cert()[source]

octavia.amphorae.backends.agent.api_server.keepalived module

class Keepalived[source]

Bases: object

manager_keepalived_service(action)[source]
upload_keepalived_config()[source]

octavia.amphorae.backends.agent.api_server.listener module

class Listener[source]

Bases: object

delete_certificate(listener_id, filename)[source]
delete_listener(listener_id)[source]
get_all_listeners_status()[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

get_certificate_md5(listener_id, filename)[source]
get_haproxy_config(listener_id)[source]

Gets the haproxy config

Parameters:listener_id – the id of the listener
get_listener_status(listener_id)[source]

Gets the status of a listener

This method will consult the stats socket so calling this method will interfere with the health daemon with the risk of the amphora shut down

Currently type==SSL is not detected :param listener_id: The id of the listener

start_stop_listener(listener_id, action)[source]
upload_certificate(listener_id, filename)[source]
upload_haproxy_config(amphora_id, listener_id)[source]

Upload the haproxy config

Parameters:
  • amphora_id – The id of the amphora to update
  • listener_id – The id of the listener
vrrp_check_script_update(listener_id, action)[source]
exception ParsingError[source]

Bases: exceptions.Exception

class Wrapped(stream_)[source]

Bases: object

get_md5()[source]
read(l)[source]

octavia.amphorae.backends.agent.api_server.osutils module

class BaseOS(os_name)[source]

Bases: object

bring_interfaces_up(ip, primary_interface, secondary_interface)[source]
create_netns_dir(network_dir, netns_network_dir, ignore=None)[source]
get_host_routes(fixed_ip)[source]
get_network_interface_file(interface)[source]
classmethod get_os_util()[source]
has_ifup_all()[source]
write_port_interface_file(netns_interface, fixed_ips, mtu, interface_file_path, template_port)[source]
write_vip_interface_file(interface_file_path, primary_interface, vip, ip, broadcast, netmask, gateway, mtu, vrrp_ip, vrrp_version, render_host_routes, template_vip)[source]
class RH(os_name)[source]

Bases: octavia.amphorae.backends.agent.api_server.osutils.BaseOS

ETH_X_ALIAS_VIP_CONF = 'rh_plug_vip_ethX_alias.conf.j2'
ETH_X_PORT_CONF = 'rh_plug_port_ethX.conf.j2'
ETH_X_VIP_CONF = 'rh_plug_vip_ethX.conf.j2'
ROUTE_ETH_X_CONF = 'rh_route_ethX.conf.j2'
bring_interfaces_up(ip, primary_interface, secondary_interface)[source]
cmd_get_version_of_installed_package(package_name)[source]
create_netns_dir(network_dir=None, netns_network_dir=None, ignore=None)[source]
get_alias_network_interface_file(interface)[source]
get_netns_network_dir()[source]
get_network_interface_file(interface)[source]
get_network_path()[source]
get_static_routes_interface_file(interface)[source]
has_ifup_all()[source]
classmethod is_os_name(os_name)[source]
write_interfaces_file()[source]
write_port_interface_file(netns_interface, fixed_ips, mtu, interface_file_path=None, template_port=None)[source]
write_static_routes_interface_file(interface_file_path, interface, host_routes, template_routes)[source]
write_vip_interface_file(interface_file_path, primary_interface, vip, ip, broadcast, netmask, gateway, mtu, vrrp_ip, vrrp_version, render_host_routes, template_vip=None)[source]
class Ubuntu(os_name)[source]

Bases: octavia.amphorae.backends.agent.api_server.osutils.BaseOS

ETH_X_PORT_CONF = 'plug_port_ethX.conf.j2'
ETH_X_VIP_CONF = 'plug_vip_ethX.conf.j2'
cmd_get_version_of_installed_package(package_name)[source]
create_netns_dir(network_dir=None, netns_network_dir=None, ignore=None)[source]
get_netns_network_dir()[source]
get_network_interface_file(interface)[source]
get_network_path()[source]
has_ifup_all()[source]
classmethod is_os_name(os_name)[source]
write_interfaces_file()[source]
write_port_interface_file(netns_interface, fixed_ips, mtu, interface_file_path=None, template_port=None)[source]
write_vip_interface_file(interface_file_path, primary_interface, vip, ip, broadcast, netmask, gateway, mtu, vrrp_ip, vrrp_version, render_host_routes, template_vip=None)[source]

octavia.amphorae.backends.agent.api_server.plug module

class Plug(osutils)[source]

Bases: object

plug_network(mac_address, fixed_ips, mtu=None)[source]
plug_vip(vip, subnet_cidr, gateway, mac_address, mtu=None, vrrp_ip=None, host_routes=None)[source]

octavia.amphorae.backends.agent.api_server.server module

class Server[source]

Bases: object

delete_certificate(listener_id, filename)[source]
delete_listener(listener_id)[source]
get_all_listeners_status()[source]
get_certificate_md5(listener_id, filename)[source]
get_details()[source]
get_haproxy_config(listener_id)[source]
get_info()[source]
get_interface(ip_addr)[source]
get_listener_status(listener_id)[source]
manage_service_vrrp(action)[source]
plug_network()[source]
plug_vip(vip)[source]
start_stop_listener(listener_id, action)[source]
upload_cert()[source]
upload_certificate(listener_id, filename)[source]
upload_haproxy_config(amphora_id, listener_id)[source]
upload_vrrp_config()[source]
make_json_error(ex)[source]
register_app_error_handler(app)[source]

octavia.amphorae.backends.agent.api_server.util module

exception UnknownInitError[source]

Bases: exceptions.Exception

config_path(listener_id)[source]
get_haproxy_pid(listener_id)[source]
get_listeners()[source]

Get Listeners

Returns:An array with the ids of all listeners, e.g. [‘123’, ‘456’, …] or [] if no listeners exist
get_os_init_system()[source]
haproxy_check_script_path()[source]
haproxy_dir(listener_id)[source]
haproxy_sock_path(listener_id)[source]
init_path(listener_id, init_system)[source]
is_listener_running(listener_id)[source]
keepalived_cfg_path()[source]
keepalived_check_script_path()[source]
keepalived_check_scripts_dir()[source]
keepalived_dir()[source]
keepalived_init_path(init_system)[source]
keepalived_log_path()[source]
keepalived_pid_path()[source]
pid_path(listener_id)[source]

Module contents

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.