Foreman API Client
A simple wrapper around Apipie-bindings to provide Ruby classes for Foreman.
Installation
Add this line to your application's Gemfile:
gem 'foreman_api_client', :git => "git://github.com/ManageIQ/foreman_api_client.git", :branch => "master"
And then execute:
$ bundle
Usage
require 'foreman_api_client'
ForemanApiClient.logger = Logger.new(STDOUT)
connection = ForemanApiClient::Connection.new(
base_url: 'https://foreman.example.com',
username: 'API_USER',
password: 'API_PASSWORD',
verify_ssl: true, # optional: Defaults to `true`
ssl_ca_file: '/path/to/ssl_ca_file.pem', # optional: Path to CA certificate file.
)
c.host(1)
=> #<ForemanApiClient::Host:0x0055b8a05daa58 ...>Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
License
The gem is available as open source under the terms of the Apache License 2.0.