def GetLoadBalancers(region, node_types=None):
 elb_names = []
 if (node_types is not None):
  for n in node_types:
   assert (n in kLoadBalancerNames.keys()), ('node_type %s does not have an associated load balancer (%r)' % (n, kLoadBalancerNames))
   elb_names.append(kLoadBalancerNames[n])
 if (not elb_names):
  elb_names = None
 ec2_elb = _ConnectELB(region)
 return ec2_elb.get_all_load_balancers(load_balancer_names=elb_names)

def GetLoadBalancers ( region , node_types = None ) : elb_names = [ ] if ( node_types is not None ) : for n in node_types : assert ( n in kLoadBalancerNames . keys ( ) ) , ( 'node_type %s does not have an associated load balancer (%r)' % ( n , kLoadBalancerNames ) ) elb_names . append ( kLoadBalancerNames [ n ] ) if ( not elb_names ) : elb_names = None ec2_elb = _ConnectELB ( region ) return ec2_elb . get_all_load_balancers ( load_balancer_names = elb_names )
return all load balancers in a given region .