foreman_api 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +4 -0
- data/Gemfile +5 -0
- data/README.rdoc +23 -4
- data/doc/ForemanApi/Resources/Architecture.html +902 -0
- data/doc/ForemanApi/Resources/Audit.html +500 -0
- data/doc/ForemanApi/Resources/AuthSourceLdap.html +916 -0
- data/doc/ForemanApi/Resources/Bookmark.html +884 -0
- data/doc/ForemanApi/Resources/CommonParameter.html +902 -0
- data/doc/ForemanApi/Resources/ComputeResource.html +940 -0
- data/doc/ForemanApi/Resources/ConfigTemplate.html +1160 -0
- data/doc/ForemanApi/Resources/Dashboard.html +336 -0
- data/doc/ForemanApi/Resources/Domain.html +914 -0
- data/doc/ForemanApi/Resources/Environment.html +898 -0
- data/doc/ForemanApi/Resources/FactValue.html +375 -0
- data/doc/ForemanApi/Resources/Home.html +417 -0
- data/doc/ForemanApi/Resources/Host.html +1091 -0
- data/doc/ForemanApi/Resources/Hostgroup.html +934 -0
- data/doc/ForemanApi/Resources/Image.html +963 -0
- data/doc/ForemanApi/Resources/LookupKey.html +918 -0
- data/doc/ForemanApi/Resources/Medium.html +920 -0
- data/doc/ForemanApi/Resources/Model.html +910 -0
- data/doc/ForemanApi/Resources/OperatingSystem.html +1057 -0
- data/doc/ForemanApi/Resources/Ptable.html +906 -0
- data/doc/ForemanApi/Resources/Puppetclass.html +898 -0
- data/doc/ForemanApi/Resources/Report.html +625 -0
- data/doc/ForemanApi/Resources/Role.html +872 -0
- data/doc/ForemanApi/Resources/Setting.html +641 -0
- data/doc/ForemanApi/Resources/SmartProxy.html +889 -0
- data/doc/ForemanApi/Resources/Subnet.html +954 -0
- data/doc/ForemanApi/Resources/TemplateKind.html +349 -0
- data/doc/ForemanApi/Resources/User.html +920 -0
- data/doc/ForemanApi/Resources/Usergroup.html +872 -0
- data/doc/ForemanApi/Resources.html +117 -0
- data/doc/ForemanApi.html +117 -0
- data/doc/_index.html +449 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +328 -0
- data/doc/file.MIT-LICENSE.html +93 -0
- data/doc/file.README.html +129 -0
- data/doc/file_list.html +58 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +129 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1300 -0
- data/doc/top-level-namespace.html +112 -0
- data/foreman_api.gemspec +5 -2
- data/lib/foreman_api/base.rb +129 -0
- data/lib/foreman_api/resources/architecture.rb +17 -7
- data/lib/foreman_api/resources/audit.rb +7 -4
- data/lib/foreman_api/resources/auth_source_ldap.rb +35 -7
- data/lib/foreman_api/resources/bookmark.rb +19 -7
- data/lib/foreman_api/resources/common_parameter.rb +17 -7
- data/lib/foreman_api/resources/compute_resource.rb +33 -7
- data/lib/foreman_api/resources/config_template.rb +28 -9
- data/lib/foreman_api/resources/dashboard.rb +3 -3
- data/lib/foreman_api/resources/domain.rb +21 -7
- data/lib/foreman_api/resources/environment.rb +15 -7
- data/lib/foreman_api/resources/fact_value.rb +6 -3
- data/lib/foreman_api/resources/home.rb +2 -4
- data/lib/foreman_api/resources/host.rb +50 -8
- data/lib/foreman_api/resources/hostgroup.rb +33 -7
- data/lib/foreman_api/resources/image.rb +30 -7
- data/lib/foreman_api/resources/lookup_key.rb +25 -7
- data/lib/foreman_api/resources/medium.rb +19 -7
- data/lib/foreman_api/resources/model.rb +21 -7
- data/lib/foreman_api/resources/operating_system.rb +26 -8
- data/lib/foreman_api/resources/ptable.rb +19 -7
- data/lib/foreman_api/resources/puppetclass.rb +15 -7
- data/lib/foreman_api/resources/report.rb +8 -5
- data/lib/foreman_api/resources/role.rb +13 -7
- data/lib/foreman_api/resources/setting.rb +11 -5
- data/lib/foreman_api/resources/smart_proxy.rb +16 -7
- data/lib/foreman_api/resources/subnet.rb +39 -7
- data/lib/foreman_api/resources/template_kind.rb +4 -3
- data/lib/foreman_api/resources/user.rb +26 -7
- data/lib/foreman_api/resources/usergroup.rb +13 -7
- data/lib/foreman_api/rest_client_oauth.rb +19 -0
- data/lib/foreman_api/version.rb +1 -1
- data/lib/foreman_api.rb +6 -10
- metadata +51 -18
data/.yardopts
ADDED
data/Gemfile
CHANGED
data/README.rdoc
CHANGED
@@ -15,14 +15,33 @@
|
|
15
15
|
=> nil
|
16
16
|
|
17
17
|
== Description
|
18
|
-
|
19
|
-
This gem contains Foreman API bindings for the Ruby language. The bindings are generated from API documentation using {Apidoc}[https://github.com/Pajk/apipie-rails] tool.
|
20
18
|
|
21
|
-
|
19
|
+
This gem contains Foreman API bindings for the Ruby language. The
|
20
|
+
bindings are generated from API documentation using
|
21
|
+
{Apidoc}[https://github.com/Pajk/apipie-rails] tool.
|
22
|
+
|
23
|
+
The bindings brings support for new versioned API which is not
|
24
|
+
complete yet. The number of supported controllers is limited but more
|
25
|
+
are coming soon.
|
26
|
+
|
27
|
+
=== Regenerating bindings
|
28
|
+
|
29
|
+
The code for generating the bindings is a part of this repo. The
|
30
|
+
generator needs a running Foreman instance to load the apidoc.json.
|
31
|
+
|
32
|
+
Usage:
|
33
|
+
|
34
|
+
bin/generate.rb -h
|
35
|
+
Script for generating API bindings for Foreman API from Apipie docs.
|
36
|
+
-u, --url FOREMAN_APIDOC_URL By default http://localhost:3000/apidoc
|
37
|
+
-h, --help
|
38
|
+
|
39
|
+
Only files under +lib/foreman_api/resources+ are touched by the generator.
|
22
40
|
|
23
41
|
=== Authentication
|
24
42
|
|
25
|
-
Foreman API supports authentication with username/password and OAuth.
|
43
|
+
Foreman API supports authentication with username/password and OAuth.
|
44
|
+
For use of OAuth with the bindings you only have to change the params
|
26
45
|
|
27
46
|
architectures = ForemanApi::Resources::Architecture.new(:base_url => 'http://localhost:3000',
|
28
47
|
:oauth => { :consumer_key => 'mykey',
|