Fix indenting.

This commit is contained in:
David Shrewsbury
2012-10-18 08:47:57 -07:00
parent c54f4a5fd7
commit 29039f20f4

View File

@@ -9,8 +9,8 @@ Gearman Task
.. py:function:: lbaas_task(worker, job)
This is the function executed by the Gearman worker for each message
retrieved from a Gearman job server.
This is the function executed by the Gearman worker for each message
retrieved from a Gearman job server.
Server Class
------------
@@ -19,19 +19,19 @@ Server Class
.. py:class:: Server(logger, servers, reconnect_sleep)
This class encapsulates the server activity once it starts in either
daemon or non-daemon mode and all configuration options are read.
This class encapsulates the server activity once it starts in either
daemon or non-daemon mode and all configuration options are read.
.. py:method:: main()
.. py:method:: main()
The one and only method in the class and represents the primary
function of the program. The Gearman worker is started in this method,
which then executes the :py:func:`~lbaas_task` function for each message.
It does not exit unless the worker itself exits.
The one and only method in the class and represents the primary
function of the program. The Gearman worker is started in this method,
which then executes the :py:func:`~lbaas_task` function for each message.
It does not exit unless the worker itself exits.
If all Gearman job servers become unavailable, the worker would
normally exit. This method identifies that situation and periodically
attempts to restart the worker in an endless loop.
If all Gearman job servers become unavailable, the worker would
normally exit. This method identifies that situation and periodically
attempts to restart the worker in an endless loop.
LBaaSController Class
---------------------
@@ -40,15 +40,15 @@ LBaaSController Class
.. py:class:: LBaaSController(logger, driver, json_msg)
This class is used by the :py:func:`~libra.worker.worker.lbaas_task` function drive the
Gearman message handling.
This class is used by the :py:func:`~libra.worker.worker.lbaas_task` function drive the
Gearman message handling.
.. py:method:: run()
.. py:method:: run()
This is the only method that should be called directly. It parses the
JSON message given during object instantiation and determines the action
to perform based on the contents. It returns another JSON message that
should then be returned to the Gearman client.
This is the only method that should be called directly. It parses the
JSON message given during object instantiation and determines the action
to perform based on the contents. It returns another JSON message that
should then be returned to the Gearman client.
LoadBalancerDriver Class
------------------------
@@ -57,31 +57,31 @@ LoadBalancerDriver Class
.. py:class:: LoadBalancerDriver
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.`
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 :py:meth:`create` method is called.
The :py:meth:`suspend`, :py:meth:`enable`, and :py:meth:`delete` methods
should take immediate action.
Generally, an appliance driver should queue up any configuration changes
made via these API calls until the :py:meth:`create` method is called.
The :py:meth:`suspend`, :py:meth:`enable`, and :py:meth:`delete` methods
should take immediate action.
.. py:method:: init()
.. py:method:: init()
.. py:method:: add_server(host, port)
.. py:method:: add_server(host, port)
.. py:method:: set_protocol(protocol, port)
.. py:method:: set_protocol(protocol, port)
.. py:method:: set_algorithm(algorithm)
.. py:method:: set_algorithm(algorithm)
.. py:method:: create()
.. py:method:: create()
.. py:method:: suspend()
.. py:method:: suspend()
.. py:method:: enable()
.. py:method:: enable()
.. py:method:: delete()
.. py:method:: delete()
Known Load Balancer Drivers Dictionary
--------------------------------------
@@ -90,7 +90,7 @@ Known Load Balancer Drivers Dictionary
.. py:data:: known_drivers
This is the dictionary that maps values for the :option:`--driver` option
to a class implementing the driver :py:class:`~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.
This is the dictionary that maps values for the :option:`--driver` option
to a class implementing the driver :py:class:`~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.