def check_min_healthy_instances(min_healthy):
 healthy = ec2_utils.GetELBInstancesByHealth(env.region, node_types=[env.nodetype])
 num_healthy = len(healthy['InService'])
 assert (num_healthy >= min_healthy), ('Not enough backends with healthy ELB status (%d vs %d)' % (num_healthy, min_healthy))

def check_min_healthy_instances ( min_healthy ) : healthy = ec2_utils . GetELBInstancesByHealth ( env . region , node_types = [ env . nodetype ] ) num_healthy = len ( healthy [ 'InService' ] ) assert ( num_healthy >= min_healthy ) , ( 'Not enough backends with healthy ELB status (%d vs %d)' % ( num_healthy , min_healthy ) )
lookup the number of instances by elb state and assert if the minimum required is not met .