API server: improve list performence
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
Trunk |
Fix Committed
|
Undecided
|
Unassigned | |||
OpenContrail |
New
|
Undecided
|
Unassigned |
Bug Description
2. In resource-listing, if not admin-request a call to read from DB for obj_uuids is made with id-perms specified.
/usr/lib/
-> filters, req_fields)
/usr/
-> obj_type, obj_ids_list, obj_fields)
/usr/
-> obj_fields)
> /usr/lib/
However vnc_cassandra.py object_read reads in all properties + refs if field_names doesnt have any children or backref.
Add one more if check to see if only props have been specified in field_names, read from cassandra with columns=[prop:+x for x in field_names]
so need to change...
321 if (field_names is None or
322 (set(field_names) & (obj_class.
323 # atleast one backref/children field is needed
324 obj_rows = obj_uuid_
325 column_
326 include_
327 else: # ignore reading backref + children columns
(Pdb)
328 obj_rows = obj_uuid_
329 column_start='d',
330 column_
331 include_
...
to (need to handle propl: case)
if (field_names is None or
# atleast one backref/children field is needed
elif not set(field_names) & (obj_class.
# specific props have been asked fetch exactly those
columns = []
for fname in field_names:
if fname in obj_class.
else: # ignore reading backref + children columns
Review in progress for https:/ /review. opencontrail. org/20525
Submitter: ?douard Thuleau (<email address hidden>)