Part of libcloud.loadbalancer.base View Source View In Hierarchy
Known subclasses: libcloud.loadbalancer.drivers.brightbox.BrightboxLBDriver, libcloud.loadbalancer.drivers.cloudstack.CloudStackLBDriver, libcloud.loadbalancer.drivers.elb.ElasticLBDriver, libcloud.loadbalancer.drivers.gogrid.GoGridLBDriver, libcloud.loadbalancer.drivers.rackspace.RackspaceLBDriver
A base LBDriver class to derive from This class is always subclassed by a specific driver.
Method | __init__ | @param key: API key or username to be used (required) @type key: C{str} |
Method | list_protocols | Return a list of supported protocols. |
Method | list_balancers | List all loadbalancers |
Method | create_balancer | Create a new load balancer instance |
Method | destroy_balancer | Destroy a load balancer |
Method | get_balancer | Return a L{LoadBalancer} object. |
Method | update_balancer | Sets the name, algorithm, protocol, or port on a load balancer. |
Method | balancer_attach_compute_node | Attach a compute node as a member to the load balancer. |
Method | balancer_attach_member | Attach a member to balancer |
Method | balancer_detach_member | Detach member from balancer |
Method | balancer_list_members | Return list of members attached to balancer |
Method | list_supported_algorithms | Return algorithms supported by this driver. |
Method | _value_to_algorithm | Return C{LBAlgorithm} based on the value. |
Method | _algorithm_to_value | Return value based in the algorithm (C{LBAlgorithm}). |
Inherited from BaseDriver:
Method | _ex_connection_class_kwargs | Return extra connection keyword arguments which are passed to the Connection class constructor. |
@param key: API key or username to be used (required) @type key: C{str} @param secret: Secret password to be used (required) @type secret: C{str} @param secure: Weither to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default. @type secure: C{bool} @param host: Override hostname used for connections. @type host: C{str} @param port: Override port used for connections. @type port: C{int} @param api_version: Optional API version. Only used by drivers which support multiple API versions. @type api_version: C{str} @rtype: C{None}
Return a list of supported protocols. @rtype: C{list} of C{str}
List all loadbalancers @rtype: C{list} of L{LoadBalancer}
Create a new load balancer instance @param name: Name of the new load balancer (required) @type name: C{str} @param port: Port the load balancer should listen on, defaults to 80 @type port: C{str} @param protocol: Loadbalancer protocol, defaults to http. @type protocol: C{str} @param members: list of Members to attach to balancer @type members: C{list} of L{Member} @param algorithm: Load balancing algorithm, defaults to ROUND_ROBIN @type algorithm: L{Algorithm} @rtype: L{LoadBalancer}
Destroy a load balancer @param balancer: LoadBalancer which should be used @type balancer: L{LoadBalancer} @return: True if the destroy was successful, otherwise False @rtype: C{bool}
Return a L{LoadBalancer} object. @param balancer_id: id of a load balancer you want to fetch @type balancer_id: C{str} @rtype: L{LoadBalancer}
Sets the name, algorithm, protocol, or port on a load balancer. @param balancer: LoadBalancer which should be used @type balancer: L{LoadBalancer} @keyword name: New load balancer name @type name: C{str} @keyword algorithm: New load balancer algorithm @type algorithm: L{Algorithm} @keyword protocol: New load balancer protocol @type protocol: C{str} @keyword port: New load balancer port @type port: C{int} @rtype: L{LoadBalancer}
Attach a compute node as a member to the load balancer. @param balancer: LoadBalancer which should be used @type balancer: L{LoadBalancer} @param node: Node to join to the balancer @type node: L{Node} @return: Member after joining the balancer. @rtype: L{Member}
Attach a member to balancer @param balancer: LoadBalancer which should be used @type balancer: L{LoadBalancer} @param member: Member to join to the balancer @type member: L{Member} @return: Member after joining the balancer. @rtype: L{Member}
Detach member from balancer @param balancer: LoadBalancer which should be used @type balancer: L{LoadBalancer} @param member: Member which should be used @type member: L{Member} @return: True if member detach was successful, otherwise False @rtype: C{bool}
Return list of members attached to balancer @param balancer: LoadBalancer which should be used @type balancer: L{LoadBalancer} @rtype: C{list} of L{Member}
Return value based in the algorithm (C{LBAlgorithm}).
Return algorithms supported by this driver. @rtype: C{list} of C{str}