check elb type in compare_subnets for elbv2 (#50203)
* Add check for elb type to fix difference between NLB and ALB AZ return structure Fixes #49558 * Fix spacing for pep8 (hopefully) compliancE * use empty array default instead of loadbalancer type detection hat tip briantist * spacing is probably important.
This commit is contained in:
parent
98db75e7e7
commit
71ef69d51f
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ class ElasticLoadBalancerV2(object):
|
||||||
# on the load balancer
|
# on the load balancer
|
||||||
for subnet in self.elb['AvailabilityZones']:
|
for subnet in self.elb['AvailabilityZones']:
|
||||||
this_mapping = {'SubnetId': subnet['SubnetId']}
|
this_mapping = {'SubnetId': subnet['SubnetId']}
|
||||||
for address in subnet['LoadBalancerAddresses']:
|
for address in subnet.get('LoadBalancerAddresses', []):
|
||||||
if 'AllocationId' in address:
|
if 'AllocationId' in address:
|
||||||
this_mapping['AllocationId'] = address['AllocationId']
|
this_mapping['AllocationId'] = address['AllocationId']
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue