Loadbalancer as a Service

https://wiki.openstack.org/wiki/Neutron/LBaaS/Architecture

https://wiki.openstack.org/wiki/Neutron/LBaaS/API_1.0

Plugin

class neutron.services.loadbalancer.plugin.LoadBalancerPlugin

Implementation of the Neutron Loadbalancer Service Plugin.

This class manages the workflow of LBaaS request/response. Most DB related works are implemented in class loadbalancer_db.LoadBalancerPluginDb.

populate_vip_graph(context, vip)

Populate the vip with: pool, members, healthmonitors.

Database layer

class neutron.db.loadbalancer.loadbalancer_db.LoadBalancerPluginDb

Wraps loadbalancer with SQLAlchemy models.

A class that wraps the implementation of the Neutron loadbalancer plugin database access interface using SQLAlchemy models.

delete_health_monitor(context, id)

Delete health monitor object from DB

Raises an error if the monitor has associations with pools

update_pool_stats(context, pool_id, data=None)

Update a pool with new stats structure.

Driver layer

class neutron.services.loadbalancer.drivers.abstract_driver.LoadBalancerAbstractDriver

Abstract lbaas driver that expose ~same API as lbaas plugin.

The configuration elements (Vip,Member,etc) are the dicts that are returned to the tenant. Get operations are not part of the API - it will be handled by the lbaas plugin.

create_member(context, member)

Driver may call the code below in order to update the status. self.plugin.update_status(context, Member, member[“id”], constants.ACTIVE)

create_pool(context, pool)

Driver may call the code below in order to update the status. self.plugin.update_status(context, Pool, pool[“id”], constants.ACTIVE)

create_pool_health_monitor(context, health_monitor, pool_id)

Driver may call the code below in order to update the status. self.plugin.update_pool_health_monitor(context, health_monitor[“id”], pool_id, constants.ACTIVE)

create_vip(context, vip)

A real driver would invoke a call to his backend and set the Vip status to ACTIVE/ERROR according to the backend call result self.plugin.update_status(context, Vip, vip[“id”],

constants.ACTIVE)
delete_pool(context, pool)

Driver can call the code below in order to delete the pool. self.plugin._delete_db_pool(context, pool[“id”]) or set the status to ERROR if deletion failed

delete_vip(context, vip)

A real driver would invoke a call to his backend and try to delete the Vip. if the deletion was successful, delete the record from the database. if the deletion has failed, set the Vip status to ERROR.

update_member(context, old_member, member)

Driver may call the code below in order to update the status. self.plugin.update_status(context, Member, member[“id”], constants.ACTIVE)

update_pool(context, old_pool, pool)

Driver may call the code below in order to update the status. self.plugin.update_status(context, Pool, pool[“id”], constants.ACTIVE)

update_vip(context, old_vip, vip)

Driver may call the code below in order to update the status. self.plugin.update_status(context, Vip, id, constants.ACTIVE)

Table Of Contents

Previous topic

Firewall as a Service

Next topic

VPN as a Service

This Page