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.
Files changed (84) hide show
  1. data/.yardopts +4 -0
  2. data/Gemfile +5 -0
  3. data/README.rdoc +23 -4
  4. data/doc/ForemanApi/Resources/Architecture.html +902 -0
  5. data/doc/ForemanApi/Resources/Audit.html +500 -0
  6. data/doc/ForemanApi/Resources/AuthSourceLdap.html +916 -0
  7. data/doc/ForemanApi/Resources/Bookmark.html +884 -0
  8. data/doc/ForemanApi/Resources/CommonParameter.html +902 -0
  9. data/doc/ForemanApi/Resources/ComputeResource.html +940 -0
  10. data/doc/ForemanApi/Resources/ConfigTemplate.html +1160 -0
  11. data/doc/ForemanApi/Resources/Dashboard.html +336 -0
  12. data/doc/ForemanApi/Resources/Domain.html +914 -0
  13. data/doc/ForemanApi/Resources/Environment.html +898 -0
  14. data/doc/ForemanApi/Resources/FactValue.html +375 -0
  15. data/doc/ForemanApi/Resources/Home.html +417 -0
  16. data/doc/ForemanApi/Resources/Host.html +1091 -0
  17. data/doc/ForemanApi/Resources/Hostgroup.html +934 -0
  18. data/doc/ForemanApi/Resources/Image.html +963 -0
  19. data/doc/ForemanApi/Resources/LookupKey.html +918 -0
  20. data/doc/ForemanApi/Resources/Medium.html +920 -0
  21. data/doc/ForemanApi/Resources/Model.html +910 -0
  22. data/doc/ForemanApi/Resources/OperatingSystem.html +1057 -0
  23. data/doc/ForemanApi/Resources/Ptable.html +906 -0
  24. data/doc/ForemanApi/Resources/Puppetclass.html +898 -0
  25. data/doc/ForemanApi/Resources/Report.html +625 -0
  26. data/doc/ForemanApi/Resources/Role.html +872 -0
  27. data/doc/ForemanApi/Resources/Setting.html +641 -0
  28. data/doc/ForemanApi/Resources/SmartProxy.html +889 -0
  29. data/doc/ForemanApi/Resources/Subnet.html +954 -0
  30. data/doc/ForemanApi/Resources/TemplateKind.html +349 -0
  31. data/doc/ForemanApi/Resources/User.html +920 -0
  32. data/doc/ForemanApi/Resources/Usergroup.html +872 -0
  33. data/doc/ForemanApi/Resources.html +117 -0
  34. data/doc/ForemanApi.html +117 -0
  35. data/doc/_index.html +449 -0
  36. data/doc/class_list.html +53 -0
  37. data/doc/css/common.css +1 -0
  38. data/doc/css/full_list.css +57 -0
  39. data/doc/css/style.css +328 -0
  40. data/doc/file.MIT-LICENSE.html +93 -0
  41. data/doc/file.README.html +129 -0
  42. data/doc/file_list.html +58 -0
  43. data/doc/frames.html +28 -0
  44. data/doc/index.html +129 -0
  45. data/doc/js/app.js +214 -0
  46. data/doc/js/full_list.js +173 -0
  47. data/doc/js/jquery.js +4 -0
  48. data/doc/method_list.html +1300 -0
  49. data/doc/top-level-namespace.html +112 -0
  50. data/foreman_api.gemspec +5 -2
  51. data/lib/foreman_api/base.rb +129 -0
  52. data/lib/foreman_api/resources/architecture.rb +17 -7
  53. data/lib/foreman_api/resources/audit.rb +7 -4
  54. data/lib/foreman_api/resources/auth_source_ldap.rb +35 -7
  55. data/lib/foreman_api/resources/bookmark.rb +19 -7
  56. data/lib/foreman_api/resources/common_parameter.rb +17 -7
  57. data/lib/foreman_api/resources/compute_resource.rb +33 -7
  58. data/lib/foreman_api/resources/config_template.rb +28 -9
  59. data/lib/foreman_api/resources/dashboard.rb +3 -3
  60. data/lib/foreman_api/resources/domain.rb +21 -7
  61. data/lib/foreman_api/resources/environment.rb +15 -7
  62. data/lib/foreman_api/resources/fact_value.rb +6 -3
  63. data/lib/foreman_api/resources/home.rb +2 -4
  64. data/lib/foreman_api/resources/host.rb +50 -8
  65. data/lib/foreman_api/resources/hostgroup.rb +33 -7
  66. data/lib/foreman_api/resources/image.rb +30 -7
  67. data/lib/foreman_api/resources/lookup_key.rb +25 -7
  68. data/lib/foreman_api/resources/medium.rb +19 -7
  69. data/lib/foreman_api/resources/model.rb +21 -7
  70. data/lib/foreman_api/resources/operating_system.rb +26 -8
  71. data/lib/foreman_api/resources/ptable.rb +19 -7
  72. data/lib/foreman_api/resources/puppetclass.rb +15 -7
  73. data/lib/foreman_api/resources/report.rb +8 -5
  74. data/lib/foreman_api/resources/role.rb +13 -7
  75. data/lib/foreman_api/resources/setting.rb +11 -5
  76. data/lib/foreman_api/resources/smart_proxy.rb +16 -7
  77. data/lib/foreman_api/resources/subnet.rb +39 -7
  78. data/lib/foreman_api/resources/template_kind.rb +4 -3
  79. data/lib/foreman_api/resources/user.rb +26 -7
  80. data/lib/foreman_api/resources/usergroup.rb +13 -7
  81. data/lib/foreman_api/rest_client_oauth.rb +19 -0
  82. data/lib/foreman_api/version.rb +1 -1
  83. data/lib/foreman_api.rb +6 -10
  84. metadata +51 -18
data/.yardopts ADDED
@@ -0,0 +1,4 @@
1
+ lib/foreman_api/resources/*.rb
2
+ -
3
+ README.rdoc
4
+ MIT-LICENSE
data/Gemfile CHANGED
@@ -1,3 +1,8 @@
1
1
  source :rubygems
2
2
 
3
3
  gemspec
4
+
5
+ group :generator do
6
+ gem 'activesupport'
7
+ gem 'thor'
8
+ end
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
- The bindings brings support for new versioned API which is not complete yet. The number of supported controllers is limited but more are comming soon.
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. For use of OAuth with the bindings you only have to change the params
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',