remove double dict & fix increment bug
This commit is contained in:
parent
0e6e3e097e
commit
848e9de950
1 changed files with 6 additions and 6 deletions
|
@ -393,11 +393,11 @@ class ElbManager(object):
|
||||||
|
|
||||||
# status of instances behind the ELB
|
# status of instances behind the ELB
|
||||||
if info['instances']:
|
if info['instances']:
|
||||||
info['instance_health'] = [ dict({
|
info['instance_health'] = [ dict(
|
||||||
"instance_id": instance_state.instance_id,
|
instance_id = instance_state.instance_id,
|
||||||
"reason_code": instance_state.reason_code,
|
reason_code = instance_state.reason_code,
|
||||||
"state": instance_state.state,
|
state = instance_state.state
|
||||||
}) for instance_state in self.elb_conn.describe_instance_health(self.name)]
|
) for instance_state in self.elb_conn.describe_instance_health(self.name)]
|
||||||
else:
|
else:
|
||||||
info['instance_health'] = []
|
info['instance_health'] = []
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ class ElbManager(object):
|
||||||
elif instance_state['state'] == "OutOfService":
|
elif instance_state['state'] == "OutOfService":
|
||||||
info['out_of_service_count'] += 1
|
info['out_of_service_count'] += 1
|
||||||
else:
|
else:
|
||||||
info['unknown_instance_state_count'] =+ 1
|
info['unknown_instance_state_count'] += 1
|
||||||
|
|
||||||
if check_elb.health_check:
|
if check_elb.health_check:
|
||||||
info['health_check'] = {
|
info['health_check'] = {
|
||||||
|
|
Loading…
Reference in a new issue