libra/doc/worker/driver.rst
Endre Karlson f408a9180d [DOCS] Improvements for worker drivers and fixes
Change-Id: I7185555f0b613ea5e5d913755e49d1b97ec382f1
2013-10-11 12:35:47 +02:00

1.8 KiB

Drivers

The driver is the part of the Worker which is responsible for doing actions towards the underlying service like HAProxy or other.

It's a plugin based python class that has a generic API for configuring up device.

LoadBalancerDriver Class

See Drivers for driver documentation

This defines the API for interacting with various load balancing appliances. Drivers for these appliances should inherit from this class and implement the relevant API methods that it can support. This is an abstract class and is not meant to be instantiated directly.

Generally, an appliance driver should queue up any configuration changes made via these API calls until the :pycreate method is called. The :pysuspend, :pyenable, :pydelete, :pyget_stats() and :pyarchive methods should take immediate action.

Known Load Balancer Drivers Dictionary

This is the dictionary that maps values for the --driver <libra_worker.py --driver> option to a class implementing the driver :py~LoadBalancerDriver API for that appliance. After implementing a new driver class, you simply add a new entry to this dictionary to plug in the new driver.

Note

See below for driver specific documentation

drivers/*