Skip to content

Instantly share code, notes, and snippets.

@xorpaul
Created August 15, 2017 15:27
Show Gist options
  • Save xorpaul/7c9fb197c583c5bb8a07dbb125aefdc1 to your computer and use it in GitHub Desktop.
Save xorpaul/7c9fb197c583c5bb8a07dbb125aefdc1 to your computer and use it in GitHub Desktop.
Foreman API Ruby binding per_page

https://github.com/theforeman/foreman_api

  d = ForemanApi::Resources::ConfigTemplate.new(
    {
      :base_url => $logindata[:foreman][:host],
      :username => $logindata[:foreman][:username],
      :password => $logindata[:foreman][:password],
    })

  data = d.index(headers={:page => 1, :per_page => 9000})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment