Closed fpytloun closed 9 years ago
Ok, found per_page argument. Should be documented somewhere :-)
index(self, search=None, order=None, page=None, per_page=None) method of foreman.client.Hosts instance
List all hosts
:param search: filter results; Must be String (OPTIONAL)
:param order: sort results; Must be String (OPTIONAL)
:param page: paginate results; Must be String (OPTIONAL)
:param per_page: number of entries per request; Must be String (OPTIONAL)
So solution can be eg.:
f.index_hosts(per_page=999999)
Unfortunately client has no support for pagination. Eg. if I call following against Foreman with more than 50 hosts:
The result looks like:
I believe this is a bug because it makes listing all hosts/users/whatever impossible and user has to handle pages on his own.