Fixes a bug where pagination was incorrect. (#628)
This commit is contained in:
parent
072ca4da4f
commit
f8279d6972
|
@ -63,11 +63,10 @@ def get_all_elbs(**kwargs):
|
||||||
|
|
||||||
elbs += response['LoadBalancerDescriptions']
|
elbs += response['LoadBalancerDescriptions']
|
||||||
|
|
||||||
if not response.get('IsTruncated'):
|
if not response.get('NextMarker'):
|
||||||
return elbs
|
return elbs
|
||||||
|
else:
|
||||||
if response['NextMarker']:
|
kwargs.update(dict(Marker=response['NextMarker']))
|
||||||
kwargs.update(dict(marker=response['NextMarker']))
|
|
||||||
|
|
||||||
|
|
||||||
def get_all_elbs_v2(**kwargs):
|
def get_all_elbs_v2(**kwargs):
|
||||||
|
@ -83,11 +82,10 @@ def get_all_elbs_v2(**kwargs):
|
||||||
response = get_elbs_v2(**kwargs)
|
response = get_elbs_v2(**kwargs)
|
||||||
elbs += response['LoadBalancers']
|
elbs += response['LoadBalancers']
|
||||||
|
|
||||||
if not response.get('IsTruncated'):
|
if not response.get('NextMarker'):
|
||||||
return elbs
|
return elbs
|
||||||
|
else:
|
||||||
if response['NextMarker']:
|
kwargs.update(dict(Marker=response['NextMarker']))
|
||||||
kwargs.update(dict(marker=response['NextMarker']))
|
|
||||||
|
|
||||||
|
|
||||||
@sts_client('elbv2')
|
@sts_client('elbv2')
|
||||||
|
|
Loading…
Reference in New Issue