octavia.amphorae.drivers package¶
Subpackages¶
- octavia.amphorae.drivers.haproxy package
- Submodules
- octavia.amphorae.drivers.haproxy.data_models module
- octavia.amphorae.drivers.haproxy.exceptions module
- octavia.amphorae.drivers.haproxy.rest_api_driver module
AmphoraAPIClient1_0
AmphoraAPIClient1_0.delete_cert_pem()
AmphoraAPIClient1_0.delete_listener()
AmphoraAPIClient1_0.get_all_listeners()
AmphoraAPIClient1_0.get_cert_md5sum()
AmphoraAPIClient1_0.get_details()
AmphoraAPIClient1_0.get_info()
AmphoraAPIClient1_0.get_interface()
AmphoraAPIClient1_0.get_listener_status()
AmphoraAPIClient1_0.plug_network()
AmphoraAPIClient1_0.plug_vip()
AmphoraAPIClient1_0.set_interface_rules()
AmphoraAPIClient1_0.update_agent_config()
AmphoraAPIClient1_0.update_cert_for_rotation()
AmphoraAPIClient1_0.upload_cert_pem()
AmphoraAPIClient1_0.upload_config()
AmphoraAPIClient1_0.upload_udp_config()
AmphoraAPIClient1_0.upload_vrrp_config()
AmphoraAPIClientBase
CustomHostNameCheckingAdapter
HaproxyAmphoraLoadBalancerDriver
HaproxyAmphoraLoadBalancerDriver.check()
HaproxyAmphoraLoadBalancerDriver.delete()
HaproxyAmphoraLoadBalancerDriver.finalize_amphora()
HaproxyAmphoraLoadBalancerDriver.get_diagnostics()
HaproxyAmphoraLoadBalancerDriver.get_info()
HaproxyAmphoraLoadBalancerDriver.get_interface_from_ip()
HaproxyAmphoraLoadBalancerDriver.post_network_plug()
HaproxyAmphoraLoadBalancerDriver.post_vip_plug()
HaproxyAmphoraLoadBalancerDriver.reload()
HaproxyAmphoraLoadBalancerDriver.set_interface_rules()
HaproxyAmphoraLoadBalancerDriver.start()
HaproxyAmphoraLoadBalancerDriver.update()
HaproxyAmphoraLoadBalancerDriver.update_amphora_agent_config()
HaproxyAmphoraLoadBalancerDriver.update_amphora_listeners()
HaproxyAmphoraLoadBalancerDriver.upload_cert_amp()
- Module contents
- octavia.amphorae.drivers.health package
- octavia.amphorae.drivers.keepalived package
- octavia.amphorae.drivers.noop_driver package
- Submodules
- octavia.amphorae.drivers.noop_driver.driver module
NoopAmphoraLoadBalancerDriver
NoopAmphoraLoadBalancerDriver.check()
NoopAmphoraLoadBalancerDriver.delete()
NoopAmphoraLoadBalancerDriver.finalize_amphora()
NoopAmphoraLoadBalancerDriver.get_diagnostics()
NoopAmphoraLoadBalancerDriver.get_info()
NoopAmphoraLoadBalancerDriver.get_interface_from_ip()
NoopAmphoraLoadBalancerDriver.post_network_plug()
NoopAmphoraLoadBalancerDriver.post_vip_plug()
NoopAmphoraLoadBalancerDriver.reload()
NoopAmphoraLoadBalancerDriver.reload_vrrp_service()
NoopAmphoraLoadBalancerDriver.set_interface_rules()
NoopAmphoraLoadBalancerDriver.start()
NoopAmphoraLoadBalancerDriver.start_vrrp_service()
NoopAmphoraLoadBalancerDriver.stop_vrrp_service()
NoopAmphoraLoadBalancerDriver.update()
NoopAmphoraLoadBalancerDriver.update_amphora_agent_config()
NoopAmphoraLoadBalancerDriver.update_amphora_listeners()
NoopAmphoraLoadBalancerDriver.update_vrrp_conf()
NoopAmphoraLoadBalancerDriver.upload_cert_amp()
NoopManager
NoopManager.delete()
NoopManager.finalize_amphora()
NoopManager.get_diagnostics()
NoopManager.get_info()
NoopManager.get_interface_from_ip()
NoopManager.post_network_plug()
NoopManager.post_vip_plug()
NoopManager.reload()
NoopManager.start()
NoopManager.update()
NoopManager.update_amphora_agent_config()
NoopManager.update_amphora_listeners()
NoopManager.upload_cert_amp()
- Module contents
Submodules¶
octavia.amphorae.drivers.driver_base module¶
- class AmphoraLoadBalancerDriver[source]¶
Bases:
object
- abstract check(amphora: Amphora, timeout_dict: dict | None = None)[source]¶
Check connectivity to the amphora.
- Parameters:
amphora – The amphora to query.
timeout_dict – Dictionary of timeout values for calls to the amphora. May contain: req_conn_timeout, req_read_timeout, conn_max_retries, conn_retry_interval
- Raises:
TimeOutException – The amphora didn’t reply
- abstract delete(listener)[source]¶
Delete the listener on the vip.
- Parameters:
listener (octavia.db.models.Listener) – listener object, need to use its protocol_port property
- Returns:
return a value list (listener, vip, status flag–delete)
At this moment, we just build the basic structure for testing, will add more function along with the development.
- abstract finalize_amphora(amphora)[source]¶
Finalize the amphora before any listeners are configured.
- Parameters:
amphora (octavia.db.models.Amphora) – amphora object, need to use its id property
- Returns:
None
At this moment, we just build the basic structure for testing, will add more function along with the development. This is a hook for drivers who need to do additional work before an amphora becomes ready to accept listeners. Please keep in mind that amphora might be kept in an offline pool after this call.
- abstract get_diagnostics(amphora)[source]¶
Return ceilometer ready diagnostic data.
- Parameters:
amphora (octavia.db.models.Amphora) – amphora object, need to use its id property
- Returns:
return a value list (amphora.id, status flag–‘ge t_diagnostics’)
At this moment, we just build the basic structure for testing, will add more function along with the development, eventually, we want it run some expensive self tests to determine if the amphora and the lbs are healthy the idea is that those tests are triggered more infrequent than the health gathering.
- abstract get_info(amphora, raise_retry_exception=False)[source]¶
Returns information about the amphora.
- Parameters:
amphora (octavia.db.models.Amphora) – amphora object, need to use its id property
raise_retry_exception – Flag if outside task should be retried
- Returns:
return a value list (amphora.id, status flag–‘info’)
At this moment, we just build the basic structure for testing, will add more function along with the development, eventually, we want it to return information as: {“Rest Interface”: “1.0”, “Amphorae”: “1.0”, “packages”:{“ha proxy”:”1.5”}} some information might come from querying the amphora
- abstract get_interface_from_ip(amphora, ip_address, timeout_dict=None)[source]¶
Get the interface name from an IP address.
- Parameters:
amphora (octavia.db.models.Amphora) – The amphora to query.
ip_address (string) – The IP address to lookup. (IPv4 or IPv6)
timeout_dict (dict) – Dictionary of timeout values for calls to the amphora. May contain: req_conn_timeout, req_read_timeout, conn_max_retries, conn_retry_interval
- post_network_plug(amphora, port, amphora_network_config)[source]¶
Called after amphora added to network
- Parameters:
amphora (octavia.db.models.Amphora) – amphora object, needs id and network ip(s)
port (octavia.network.data_models.Port) – contains information of the plugged port
amphora_network_config (octavia.network.data_models. AmphoraNetworkConfig) – A data model containing information about the subnets and ports that an amphorae owns.
This method is optional to implement. After adding an amphora to a network, there may be steps necessary on the amphora to allow it to access said network. Ex: creating an interface on an amphora for a neutron network to utilize.
- post_vip_plug(amphora, load_balancer, amphorae_network_config, vrrp_port, vip_subnet, additional_vip_data=None)[source]¶
Called after network driver has allocated and plugged the VIP
- Parameters:
amphora (octavia.db.models.Amphora)
load_balancer (octavia.common.data_models.LoadBalancer) – A load balancer that just had its vip allocated and plugged in the network driver.
amphorae_network_config (octavia.network.data_models. AmphoraNetworkConfig) – A data model containing information about the subnets and ports that an amphorae owns.
vrrp_port (octavia.network.data_models.Port) – VRRP port associated with the load balancer
vip_subnet (octavia.network.data_models.Subnet) – VIP subnet associated with the load balancer
- Returns:
None
This is to do any additional work needed on the amphorae to plug the vip, such as bring up interfaces.
- abstract reload(loadbalancer, amphora, timeout_dict=None)[source]¶
Reload the listeners on the amphora.
- Parameters:
loadbalancer (octavia.db.models.LoadBalancer) – loadbalancer object to reload listeners
amphora (octavia.db.models.Amphora) – Amphora to start. If None, reload on all amphora
timeout_dict (dict) – Dictionary of timeout values for calls to the amphora. May contain: req_conn_timeout, req_read_timeout, conn_max_retries, conn_retry_interval
- Returns:
return a value list (listener, vip, status flag–enable)
At this moment, we just build the basic structure for testing, will add more function along with the development.
- abstract set_interface_rules(amphora: Amphora, ip_address, rules)[source]¶
Sets interface firewall rules in the amphora
- Parameters:
amphora – The amphora to query.
ip_address – The IP address assigned to the interface the rules will be applied on.
rules – The l1st of allow rules to apply.
- abstract start(loadbalancer, amphora, timeout_dict=None)[source]¶
Start the listeners on the amphora.
- Parameters:
loadbalancer (octavia.db.models.LoadBalancer) – loadbalancer object to start listeners
amphora (octavia.db.models.Amphora) – Amphora to start. If None, start on all amphora
timeout_dict (dict) – Dictionary of timeout values for calls to the amphora. May contain: req_conn_timeout, req_read_timeout, conn_max_retries, conn_retry_interval
- Returns:
return a value list (listener, vip, status flag–enable)
At this moment, we just build the basic structure for testing, will add more function along with the development.
- abstract update(loadbalancer)[source]¶
Update the amphora with a new configuration.
- Parameters:
loadbalancer (octavia.db.models.LoadBalancer) – loadbalancer object, need to use its vip.ip_address property
- Returns:
None
At this moment, we just build the basic structure for testing, will add more function along with the development.
- update_amphora_agent_config(amphora, agent_config)[source]¶
Upload and update the amphora agent configuration.
- Parameters:
amphora (octavia.db.models.Amphora) – amphora object, needs id and network ip(s)
agent_config (string) – The new amphora agent configuration file.
- abstract update_amphora_listeners(loadbalancer, amphora, timeout_dict)[source]¶
Update the amphora with a new configuration.
- Parameters:
loadbalancer (list(octavia.db.models.Listener)) – List of listeners to update.
amphora (octavia.db.models.Amphora) – The index of the specific amphora to update
timeout_dict (dict) – Dictionary of timeout values for calls to the amphora. May contain: req_conn_timeout, req_read_timeout, conn_max_retries, conn_retry_interval
- Returns:
None
Builds a new configuration, pushes it to the amphora, and reloads the listener on one amphora.
- upload_cert_amp(amphora, pem_file)[source]¶
Upload cert info to the amphora.
- Parameters:
amphora (octavia.db.models.Amphora) – amphora object, needs id and network ip(s)
pem_file (file object) – a certificate file
Upload cert file to amphora for Controller Communication.
- class VRRPDriverMixin[source]¶
Bases:
object
Abstract mixin class for VRRP support in loadbalancer amphorae
Usage: To plug VRRP support in another service driver XYZ, use: @plug_mixin(XYZ) class XYZ: …
- abstract reload_vrrp_service(loadbalancer)[source]¶
Reload the VRRP services of all amphorae of the loadbalancer
- Parameters:
loadbalancer – loadbalancer object
- abstract start_vrrp_service(amphora, timeout_dict=None)[source]¶
Start the VRRP services on the amphora
- Parameters:
amphora – The amphora object to start the service on.
timeout_dict – Dictionary of timeout values for calls to the amphora. May contain: req_conn_timeout, req_read_timeout, conn_max_retries, conn_retry_interval
- abstract stop_vrrp_service(loadbalancer)[source]¶
Stop the vrrp services running on the loadbalancer’s amphorae
- Parameters:
loadbalancer – loadbalancer object
- abstract update_vrrp_conf(loadbalancer, amphorae_network_config, amphora, timeout_dict=None)[source]¶
Update amphorae of the loadbalancer with a new VRRP configuration
- Parameters:
loadbalancer – loadbalancer object
amphorae_network_config – amphorae network configurations
amphora – The amphora object to update.
timeout_dict – Dictionary of timeout values for calls to the amphora. May contain: req_conn_timeout, req_read_timeout, conn_max_retries, conn_retry_interval