pyrax
Python Bindings for the Rackspace Cloud
 All Classes Namespaces Files Functions Variables Properties
Public Member Functions
CloudLoadBalancerManager Class Reference
Inheritance diagram for CloudLoadBalancerManager:
BaseManager

List of all members.

Public Member Functions

def update
 Provides a way to modify the following attributes of a load balancer:
def add_nodes
 Adds the list of nodes to the specified load balancer.
def delete_node
 Removes the node from its load balancer.
def update_node
 Updates the node's attributes.
def add_virtualip
 Adds the VirtualIP to the specified load balancer.
def delete_virtualip
 Deletes the VirtualIP from its load balancer.
def get_access_list
 Returns the current access list for the load balancer.
def add_access_list
 Adds the access list provided to the load balancer.
def delete_access_list
 Removes the access list from this load balancer.
def delete_access_list_items
 Removes the item(s) from the load balancer's access list that match the provided IDs.
def get_health_monitor
 Returns a dict representing the health monitor for the load balancer.
def add_health_monitor
 Adds a health monitor to the load balancer.
def delete_health_monitor
 Deletes the health monitor for the load balancer.
def get_connection_throttle
 Returns a dict representing the connection throttling information for the load balancer.
def add_connection_throttle
 Creates or updates the connection throttling information for the load balancer.
def delete_connection_throttle
 Deletes all connection throttling settings for the load balancer.
def get_ssl_termination
 Returns a dict representing the SSL termination configuration for the load balancer.
def add_ssl_termination
 Adds SSL termination information to the load balancer.
def update_ssl_termination
 Updates existing SSL termination information for the load balancer without affecting the existing certificates/keys.
def delete_ssl_termination
 Deletes the SSL Termination configuration for the load balancer.
def get_metadata
 Returns the current metadata for the load balancer.
def set_metadata
 Sets the metadata for the load balancer to the supplied dictionary of values.
def update_metadata
 Updates the existing metadata with the supplied dictionary.
def delete_metadata
 Deletes metadata items specified by the 'keys' parameter.
def get_error_page
 Load Balancers all have a default error page that is shown to an end user who is attempting to access a load balancer node that is offline/unavailable.
def set_error_page
 A single custom error page may be added per account load balancer with an HTTP protocol.
def clear_error_page
 Resets the error page to the default.
def get_usage
 Return the load balancer usage records for this account.
def get_stats
 Returns statistics for the given load balancer.
def get_session_persistence
 Returns the session persistence setting for the given load balancer.
def set_session_persistence
 Sets the session persistence for the given load balancer.
def delete_session_persistence
 Removes the session persistence setting for the given load balancer.
def get_connection_logging
 Returns the connection logging setting for the given load balancer.
def set_connection_logging
 Sets the connection logging for the given load balancer.
def get_content_caching
 Returns the content caching setting for the given load balancer.
def set_content_caching
 Sets the content caching for the given load balancer.

Member Function Documentation

def add_access_list (   self,
  loadbalancer,
  access_list 
)

Adds the access list provided to the load balancer.

The 'access_list' should be a list of dicts in the following format:

[{"address": "192.0.43.10", "type": "DENY"}, {"address": "192.0.43.11", "type": "ALLOW"}, ... {"address": "192.0.43.99", "type": "DENY"}, ]

If no access list exists, it is created. If an access list already exists, it is updated with the provided list.

def add_connection_throttle (   self,
  loadbalancer,
  maxConnectionRate = None,
  maxConnections = None,
  minConnections = None,
  rateInterval = None 
)

Creates or updates the connection throttling information for the load balancer.

When first creating the connection throttle, all 4 parameters must be supplied. When updating an existing connection throttle, at least one of the parameters must be supplied.

def add_health_monitor (   self,
  loadbalancer,
  type,
  delay = 10,
  timeout = 10,
  attemptsBeforeDeactivation = 3,
  path = "/",
  statusRegex = None,
  bodyRegex = None,
  hostHeader = None 
)

Adds a health monitor to the load balancer.

If a monitor already exists, it is updated with the supplied settings.

def add_nodes (   self,
  lb,
  nodes 
)

Adds the list of nodes to the specified load balancer.

def add_ssl_termination (   self,
  loadbalancer,
  securePort,
  privatekey,
  certificate,
  intermediateCertificate,
  enabled = True,
  secureTrafficOnly = False 
)

Adds SSL termination information to the load balancer.

If SSL termination has already been configured, it is updated with the supplied settings.

def add_virtualip (   self,
  lb,
  vip 
)

Adds the VirtualIP to the specified load balancer.

def clear_error_page (   self,
  loadbalancer 
)

Resets the error page to the default.

def delete_access_list (   self,
  loadbalancer 
)

Removes the access list from this load balancer.

def delete_access_list_items (   self,
  loadbalancer,
  item_ids 
)

Removes the item(s) from the load balancer's access list that match the provided IDs.

'item_ids' should be one or more access list item IDs.

def delete_connection_throttle (   self,
  loadbalancer 
)

Deletes all connection throttling settings for the load balancer.

def delete_health_monitor (   self,
  loadbalancer 
)

Deletes the health monitor for the load balancer.

def delete_metadata (   self,
  loadbalancer,
  keys = None,
  node = None 
)

Deletes metadata items specified by the 'keys' parameter.

If no value for 'keys' is provided, all metadata is deleted. If 'node' is supplied, the metadata for that node is deleted instead of the load balancer.

def delete_node (   self,
  loadbalancer,
  node 
)

Removes the node from its load balancer.

def delete_session_persistence (   self,
  loadbalancer 
)

Removes the session persistence setting for the given load balancer.

def delete_ssl_termination (   self,
  loadbalancer 
)

Deletes the SSL Termination configuration for the load balancer.

def delete_virtualip (   self,
  loadbalancer,
  vip 
)

Deletes the VirtualIP from its load balancer.

def get_access_list (   self,
  loadbalancer 
)

Returns the current access list for the load balancer.

def get_connection_logging (   self,
  loadbalancer 
)

Returns the connection logging setting for the given load balancer.

def get_connection_throttle (   self,
  loadbalancer 
)

Returns a dict representing the connection throttling information for the load balancer.

If no connection throttle has been configured, returns an empty dict.

def get_content_caching (   self,
  loadbalancer 
)

Returns the content caching setting for the given load balancer.

def get_error_page (   self,
  loadbalancer 
)

Load Balancers all have a default error page that is shown to an end user who is attempting to access a load balancer node that is offline/unavailable.

def get_health_monitor (   self,
  loadbalancer 
)

Returns a dict representing the health monitor for the load balancer.

If no monitor has been configured, returns an empty dict.

def get_metadata (   self,
  loadbalancer,
  node = None,
  raw = False 
)

Returns the current metadata for the load balancer.

If 'node' is provided, returns the current metadata for that node.

def get_session_persistence (   self,
  loadbalancer 
)

Returns the session persistence setting for the given load balancer.

def get_ssl_termination (   self,
  loadbalancer 
)

Returns a dict representing the SSL termination configuration for the load balancer.

If SSL termination has not been configured, returns an empty dict.

def get_stats (   self,
  loadbalancer 
)

Returns statistics for the given load balancer.

def get_usage (   self,
  loadbalancer = None,
  start = None,
  end = None 
)

Return the load balancer usage records for this account.

If 'loadbalancer' is None, records for all load balancers are returned. You may optionally include a start datetime or an end datetime, or both, which will limit the records to those on or after the start time, and those before or on the end time. These times should be Python datetime.datetime objects, Python datetime.date objects, or strings in the format: "YYYY-MM-DD HH:MM:SS" or "YYYY-MM-DD".

def set_connection_logging (   self,
  loadbalancer,
  val 
)

Sets the connection logging for the given load balancer.

def set_content_caching (   self,
  loadbalancer,
  val 
)

Sets the content caching for the given load balancer.

def set_error_page (   self,
  loadbalancer,
  html 
)

A single custom error page may be added per account load balancer with an HTTP protocol.

Page updates will override existing content. If a custom error page is deleted, or the load balancer is changed to a non-HTTP protocol, the default error page will be restored.

def set_metadata (   self,
  loadbalancer,
  metadata,
  node = None 
)

Sets the metadata for the load balancer to the supplied dictionary of values.

Any existing metadata is cleared. If 'node' is provided, the metadata for that node is set instead of for the load balancer.

def set_session_persistence (   self,
  loadbalancer,
  val 
)

Sets the session persistence for the given load balancer.

def update (   self,
  lb,
  name = None,
  algorithm = None,
  protocol = None,
  halfClosed = None,
  port = None,
  timeout = None 
)

Provides a way to modify the following attributes of a load balancer:

  • name
  • algorithm
  • protocol
  • halfClosed
  • port
  • timeout
def update_metadata (   self,
  loadbalancer,
  metadata,
  node = None 
)

Updates the existing metadata with the supplied dictionary.

If 'node' is supplied, the metadata for that node is updated instead of for the load balancer.

def update_node (   self,
  node,
  diff = None 
)

Updates the node's attributes.

def update_ssl_termination (   self,
  loadbalancer,
  securePort = None,
  enabled = None,
  secureTrafficOnly = None 
)

Updates existing SSL termination information for the load balancer without affecting the existing certificates/keys.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties