octavia.amphorae.drivers package

octavia.amphorae.drivers package

Submodules

octavia.amphorae.drivers.driver_base module

class AmphoraLoadBalancerDriver[source]

Bases: object

delete(listener, vip)[source]

Delete the listener on the vip.

Parameters:
  • listener (object) – listener object, need to use its protocol_port property
  • vip (object) – vip object, need to use its ip_address 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.

finalize_amphora(amphora)[source]

Finalize the amphora before any listeners are configured.

Parameters:amphora (object) – 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.

get_diagnostics(amphora)[source]

Return ceilometer ready diagnostic data.

Parameters:amphora (object) – 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.

get_info(amphora)[source]

Returns information about the amphora.

Parameters:amphora (object) – amphora object, need to use its id property
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

post_network_plug(amphora, port)[source]

Called after amphora added to network

Parameters:

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)[source]

Called after network driver has allocated and plugged the VIP

Parameters:
  • 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 – A data model containing information about the subnets and ports that an amphorae owns.
Returns:

None

This is to do any additional work needed on the amphorae to plug the vip, such as bring up interfaces.

start(listener, vip)[source]

Start the listener on the vip.

Parameters:
  • listener (object) – listener object, need to use its protocol_port property
  • vip (object) – vip object, need to use its ip_address property
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.

start_health_check(health_mixin)[source]

Start health checks.

Parameters:health_mixin – health mixin object

Starts listener process and calls HealthMixin to update databases information.

stop(listener, vip)[source]

Stop the listener on the vip.

Parameters:
  • listener (object) – listener object, need to use its protocol_port property
  • vip (object) – vip object, need to use its ip_address property
Returns:

return a value list (listener, vip, status flag–suspend)

At this moment, we just build the basic structure for testing, will add more function along with the development.

stop_health_check()[source]

Stop health checks.

Stops listener process and calls HealthMixin to update databases information.

update(listener, vip)[source]

Update the amphora with a new configuration.

Parameters:
  • listener (object) – listener object, need to use its protocol_port property
  • vip (object) – vip object, need to use its ip_address property
Returns:

return a value list (listener, vip, status flag–update)

At this moment, we just build the basic structure for testing, will add more function along with the development.

upload_cert_amp(amphora, pem_file)[source]

Upload cert info to the amphora.

Parameters:
  • amphora (object) – amphora object, needs id and network ip(s)
  • pem_file (file object) – a certificate file

Upload cert file to amphora for Controller Communication.

class HealthMixin[source]

Bases: object

update_health(health)[source]

Return ceilometer ready health

Parameters:health (bool) – health information emitted from the amphora
Returns:return health

At this moment, we just build the basic structure for testing, will add more function along with the development, eventually, we want it return: map: {“amphora-status”:HEALTHY, loadbalancers: {“loadbalancer-id”: {“loadbalancer-status”: HEALTHY, “listeners”:{“listener-id”:{“listener-status”:HEALTHY, “nodes”:{“node-id”:HEALTHY, …}}, …}, …}} only items whose health has changed need to be submitted awesome update code

class StatsMixin[source]

Bases: object

update_stats(stats)[source]

Return ceilometer ready stats

Parameters:stats (string) – statistic information emitted from the amphora
Returns:return stats

At this moment, we just build the basic structure for testing, will add more function along with the development, eventually, we want it return: uses map {“loadbalancer-id”:{“listener-id”: {“bytes-in”: 123, “bytes_out”:123, “active_connections”:123, “total_connections”, 123}, …} elements are named to keep it extsnsible for future versions awesome update code and code to send to ceilometer

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: …

get_vrrp_interface(amphora)[source]

Get the VRRP interface object for a specific amphora

Parameters:amphora – amphora object
reload_vrrp_service(loadbalancer)[source]

Reload the VRRP services of all amphorae of the loadbalancer

Parameters:loadbalancer – loadbalancer object
start_vrrp_service(loadbalancer)[source]

Start the VRRP services of all amphorae of the loadbalancer

Parameters:loadbalancer – loadbalancer object
stop_vrrp_service(loadbalancer)[source]

Stop the vrrp services running on the loadbalancer’s amphorae

Parameters:loadbalancer – loadbalancer object
update_vrrp_conf(loadbalancer)[source]

Update amphorae of the loadbalancer with a new VRRP configuration

Parameters:loadbalancer – loadbalancer object

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.