SatelliteQE / nailgun

Why use a hammer when you can use a nailgun.
GNU General Public License v3.0
46 stars 83 forks source link

search only returns 20 entries, even if there are more #429

Open evgeni opened 7 years ago

evgeni commented 7 years ago

Ohai,

currently, when I call SomeEntity.search(), I will get the first 20 entities that match the search, but not all. This is due to how Foreman does paging on the API results. While it is OK for an API to return paged results, I think nailgun as a client should fetch all results (by fetching all the pages and merging the results).

Fobhep commented 7 years ago

+1

abalakh commented 7 years ago

Took a look at api docs, found such parameter:

full_result optional | Whether or not to show all results

Just curious, why not to use it like .search(query={'full_result': True})?

evgeni commented 7 years ago

Does not work for Provisioning Templates.

Fobhep commented 7 years ago

agreed. That does not show the full result list for Provisioning Templates or PartitionTables

evgeni commented 7 years ago

full_result=true only works on Katello API, not the Foreman API.