pcf.particle.aws.ec2.elb package

Submodules

pcf.particle.aws.ec2.elb.elb module

class pcf.particle.aws.ec2.elb.elb.ElasticLoadBalancing(particle_definition, session=None)

Bases: pcf.core.aws_resource.AWSResource

This is the implementation of Amazon’s ElasticLoadBalancing.

REMOVE_PARAM_FILTER = {'AvailabilityZones', 'LoadBalancerName', 'Scheme'}
START_PARAM_FILTER = {'AvailabilityZones', 'Listeners', 'LoadBalancerName', 'Scheme', 'SecurityGroups', 'Subnets', 'Tags'}
UPDATE_PARAM_FILTER = {'ListenerDescriptions', 'SecurityGroups', 'Subnets', 'Tags'}
_start()

creates elb particle that matches current state definition

_terminate()

deletes the load balancer particle that matches the LoadBalancerName

Returns:response of boto3 delete_load_balancer()
_update()

updates the ELB particle to match the desired state

create()

Creates a Classic Load Balancer that matches current state definition

Returns:response of boto3 create rds instance with action create_load_balancer.
flavor = 'elb'
get_status()

Get the current status of your load balancer. Calls boto3 describe_load_balancers using LoadBalancerNames

Returns:dict with the load balancer that matches the LoadBalancerName provided
is_state_definition_equivalent()

Determines if the current state definition and the desired state definition are equivalent.

Returns:bool
state_lookup = {'missing': <State.terminated: 3>, 'pending': <State.pending: 4>, 'running': <State.running: 1>}
sync_state()

Sync state calls get_status to determines and the state of the ELB particle.

pcf.particle.aws.ec2.elb.elb._need_update(curr_list, desired_list)

Checks to see if there are any difference in curr_list or desired_list. If they are different this returns True.

Parameters:
  • curr_list (list) – list of dictionaries
  • desired_list (list) – list of dictionaries
Returns:

bool

Module contents