Fix bug with update_attached_elbs (#1266)
* fixed bug where we were using elb_backend.describe_load_balancers incorrectly, returning all available load balancers when we wanted none. * improve skip, clean up tests
This commit is contained in:
parent
0af3427c15
commit
b8bb6c2dcf
2 changed files with 47 additions and 6 deletions
|
|
@ -504,6 +504,10 @@ class AutoScalingBackend(BaseBackend):
|
|||
group_instance_ids = set(
|
||||
state.instance.id for state in group.instance_states)
|
||||
|
||||
# skip this if group.load_balancers is empty
|
||||
# otherwise elb_backend.describe_load_balancers returns all available load balancers
|
||||
if not group.load_balancers:
|
||||
return
|
||||
try:
|
||||
elbs = self.elb_backend.describe_load_balancers(
|
||||
names=group.load_balancers)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue