Skip to content

Commit 6ed94c4

Browse files
committed
add status messages for filtering in load balancer query
1 parent 2f75ae2 commit 6ed94c4

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/openstack_lb_info/main.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,15 +239,15 @@ def query_openstack_lbs(openstackapi, args, formatter):
239239
if v is not None
240240
}
241241

242-
with formatter.status("Querying load balancers..."):
242+
with formatter.status("Querying load balancers and applying filters..."):
243243
filtered_lbs_tmp = openstackapi.retrieve_load_balancers(filter_criteria)
244244

245-
# Perform name filtering here rather than adding it to filter_criteria
246-
# because this allows for partial matching of the lb name
247-
if args.name:
248-
filtered_lbs = [lb for lb in filtered_lbs_tmp if args.name in lb.name]
249-
else:
250-
filtered_lbs = list(filtered_lbs_tmp)
245+
# Perform name filtering here rather than adding it to filter_criteria
246+
# because this allows for partial matching of the lb name
247+
if args.name:
248+
filtered_lbs = [lb for lb in filtered_lbs_tmp if args.name in lb.name]
249+
else:
250+
filtered_lbs = list(filtered_lbs_tmp)
251251

252252
return filtered_lbs
253253

0 commit comments

Comments
 (0)