Skip to content

Commit ea11221

Browse files
committed
object_list method, when listing all objects of a
resource type without filters calls filter_rows_no_anchor method unnecessarily when there is no filters in the request. Fixed it by returning early with count of columns read from the OBJ_FQ_NAME_TABLE. Closes-Jira-Bug: CEM-18858 Signed-off-by: Ignatious Johnson <ijohnson@juniper.net> Change-Id: I9975d0b23d72277fbf60abcad4f57101296ce6c3
1 parent 45e99ef commit ea11221

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/config/common/cfgm_common/vnc_cassandra.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,10 @@ def filter_rows_no_anchor():
10071007
return list(filt_obj_infos.values()), marker
10081008
# end filter_rows_no_anchor
10091009

1010+
if count and not filters:
1011+
# when listing all objects of a type
1012+
# return early if only count query is in request
1013+
return (True, sum(1 for col in cols), None)
10101014
filtered_rows, ret_marker = filter_rows_no_anchor()
10111015
children_fq_names_uuids.extend(filtered_rows)
10121016

0 commit comments

Comments
 (0)