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__ = <dictproxy object at 0x47d7cc8>
__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

Table Of Contents

Previous topic

IcsEc2 Common Library

Next topic

IcsAS Common Library

This Page