IcsELB Common Library

IcsELB: Library for ELB

This is the IcsELB common library.
class opslib.icselb.IcsELB(region, **kwargs)[source]

ICS Library for ELB

__dict__ = dict_proxy({'get_elb_dns_name': <function get_elb_dns_name at 0x52ce410>, 'remove_elb_listeners': <function remove_elb_listeners at 0x52ce668>, '__module__': 'opslib.icselb', '__doc__': '\n ICS Library for ELB\n ', 'set_elb_listeners': <function set_elb_listeners at 0x52ce6e0>, 'set_health_check': <function set_health_check at 0x52ce578>, '__dict__': <attribute '__dict__' of 'IcsELB' objects>, 'parse_listeners': <function parse_listeners at 0x52ce488>, 'get_all_elbs': <function get_all_elbs at 0x52ce758>, '__init__': <function __init__ at 0x5587b18>, 'create_elb': <function create_elb at 0x52ce5f0>, 'get_elb_health': <function get_elb_health at 0x52ce320>, '__weakref__': <attribute '__weakref__' of 'IcsELB' objects>, 'delete_elb': <function delete_elb at 0x52ce7d0>, 'get_elb_id': <function get_elb_id at 0x52ce500>})
__init__(region, **kwargs)[source]
__module__ = 'opslib.icselb'
__weakref__

list of weak references to the object (if defined)

create_elb(name, zones, listeners=None, subnets=None, groups=None)[source]

Create an ELB named <name>

Parameters:
  • name (string) – The mnemonic name associated with the new load balancer
  • zones (list of strings) – The names of the availability zone(s) to add
  • listeners – Each tuple contains three or four values:
  • LoadBalancerPortNumber and InstancePortNumber are integer values between 1 and 65535;
  • Protocol is a string containing ‘TCP’, ‘SSL’, ‘HTTP’, ‘HTTPS’;
  • SSLCertificateID is the ARN of a AWS AIM certificate, and must be specified when doing HTTPS
Parameters:
  • subnets (list of strings) – A list of subnet IDs in your VPC to attach to your LoadBalancer
  • groups (list of strings) – The security groups assigned to your LoadBalancer within your VPC
delete_elb(name)[source]

Remove an load balancers from your account

Parameters:name (string) – The name of the Load Balancer to delete
get_all_elbs(load_balancer_names=None)[source]

Get all load balancers in this region

Parameters:load_balancer_names (list) – An optional list of load balancer names
Return type:boto.resultset.ResultSet
Returns:A ResultSet containing instances of boto.ec2.elb.loadbalancer.LoadBalancer
get_elb_dns_name(name)[source]

Get Load Balancer DNS name. :type name: str :param name: The load balances name

Return type:str
Retrun:load balancer hosted zone id
get_elb_health(name, instance_id)[source]

check the health of the specified instance in the specified elb

Parameters:
  • name (string) – The load balances name
  • instance_id (string) – EC2 instance id startwith ‘i-xxxxxxx’
Return type:

boolean or string

Returns:

False or out of service reason

get_elb_id(name)[source]

Get Load Balancer Hosted Zone ID

Parameters:name (str) – The load balances name
Return type:str
Retrun:load balancer hosted zone id
parse_listeners(listeners)[source]

Parse elb listeners form list of string to list of tuple

Parameters:listeners (list of string) – Listeners of this elb
Returns:The list of listeners tuple
Type:list of tuple
remove_elb_listeners(name, listeners)[source]

Remove a Listener (or group of listeners) for an existing Load Balancer

Parameters:
  • name (string) – The name of the load balancer to create the listeners for
  • listeners (List int) – Each int represents the port on the ELB to be removed
set_elb_listeners(name, listeners)[source]

Create a Listener (or group of listeners) for an existing Load Balancer

Parameters:
  • name (string) – The name of the load balancer to create the listeners for
  • listeners – Listener to be setted
set_health_check(name, health_check)[source]

Configures the health check behavior for the instances behind this load balancer.

Parameters:
  • name (string) – The mnemonic name associated with the load balancer
  • health_check (boto.ec2.elb.healthcheck.HealthCheck) – A HealthCheck instance that tells the load balancer how to check its instances for health.

Indices and tables

Read the Docs v: latest
Versions
latest
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.