Load Balancer v2 API¶
The LoadBalancer Class¶
The load_balancer high-level interface is available through the
load_balancer member of a Connection object.
The load_balancer member will only be added if the service is detected.
Load Balancer Operations¶
-
class
openstack.load_balancer.v2._proxy.Proxy(session)¶ -
create_load_balancer(**attrs)¶ Create a new load balancer from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a LoadBalancer, comprised of the properties on the LoadBalancer class.Returns: The results of load balancer creation Return type: LoadBalancer
-
get_load_balancer(*attrs)¶ Get a load balancer
Parameters: load_balancer – The value can be the name of a load balancer or LoadBalancerinstance.Returns: One LoadBalancer
-
load_balancers(**query)¶ Retrieve a generator of load balancers
Returns: A generator of load balancer instances
-
delete_load_balancer(load_balancer, ignore_missing=True)¶ Delete a load balancer
Parameters: - load_balancer – The load_balancer can be either the name or a
LoadBalancerinstance - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the load balancer does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent load balancer.
Returns: None- load_balancer – The load_balancer can be either the name or a
-
find_load_balancer(name_or_id, ignore_missing=True)¶ Find a single load balancer
Parameters: - name_or_id – The name or ID of a load balancer
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the load balancer does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent load balancer.
Returns: None
-