foreman_api 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/README.rdoc +35 -18
  2. data/doc/ForemanApi/Resources/Architecture.html +93 -136
  3. data/doc/ForemanApi/Resources/Audit.html +42 -60
  4. data/doc/ForemanApi/Resources/AuthSourceLdap.html +129 -190
  5. data/doc/ForemanApi/Resources/Bookmark.html +97 -142
  6. data/doc/ForemanApi/Resources/CommonParameter.html +93 -136
  7. data/doc/ForemanApi/Resources/ComputeResource.html +131 -190
  8. data/doc/ForemanApi/Resources/ConfigTemplate.html +145 -211
  9. data/doc/ForemanApi/Resources/Dashboard.html +21 -29
  10. data/doc/ForemanApi/Resources/Domain.html +103 -151
  11. data/doc/ForemanApi/Resources/Environment.html +89 -130
  12. data/doc/ForemanApi/Resources/FactValue.html +29 -41
  13. data/doc/ForemanApi/Resources/Home.html +32 -45
  14. data/doc/ForemanApi/Resources/Host.html +317 -251
  15. data/doc/ForemanApi/Resources/HostClass.html +55 -79
  16. data/doc/ForemanApi/Resources/Hostgroup.html +125 -184
  17. data/doc/ForemanApi/Resources/HostgroupClass.html +57 -82
  18. data/doc/ForemanApi/Resources/Image.html +109 -160
  19. data/doc/ForemanApi/Resources/Location.html +937 -0
  20. data/doc/ForemanApi/Resources/LookupKey.html +111 -163
  21. data/doc/ForemanApi/Resources/Medium.html +113 -154
  22. data/doc/ForemanApi/Resources/Model.html +101 -148
  23. data/doc/ForemanApi/Resources/OperatingSystem.html +118 -173
  24. data/doc/ForemanApi/Resources/Organization.html +937 -0
  25. data/doc/ForemanApi/Resources/Parameter.html +158 -233
  26. data/doc/ForemanApi/Resources/Ptable.html +97 -142
  27. data/doc/ForemanApi/Resources/Puppetclass.html +95 -139
  28. data/doc/ForemanApi/Resources/Report.html +68 -98
  29. data/doc/ForemanApi/Resources/Role.html +85 -124
  30. data/doc/ForemanApi/Resources/Setting.html +58 -84
  31. data/doc/ForemanApi/Resources/SmartProxy.html +91 -133
  32. data/doc/ForemanApi/Resources/Subnet.html +141 -208
  33. data/doc/ForemanApi/Resources/TemplateCombination.html +65 -94
  34. data/doc/ForemanApi/Resources/TemplateKind.html +23 -32
  35. data/doc/ForemanApi/Resources/User.html +111 -163
  36. data/doc/ForemanApi/Resources/Usergroup.html +89 -130
  37. data/doc/ForemanApi/Resources.html +6 -6
  38. data/doc/ForemanApi.html +5 -5
  39. data/doc/_index.html +18 -4
  40. data/doc/class_list.html +1 -1
  41. data/doc/css/style.css +0 -10
  42. data/doc/file.MIT-LICENSE.html +24 -29
  43. data/doc/file.README.html +81 -60
  44. data/doc/frames.html +1 -1
  45. data/doc/index.html +81 -60
  46. data/doc/method_list.html +416 -312
  47. data/doc/top-level-namespace.html +3 -3
  48. data/lib/foreman_api/base.rb +16 -8
  49. data/lib/foreman_api/documentation.json +1 -1
  50. data/lib/foreman_api/resources/host.rb +9 -0
  51. data/lib/foreman_api/resources/location.rb +59 -0
  52. data/lib/foreman_api/resources/medium.rb +2 -2
  53. data/lib/foreman_api/resources/organization.rb +59 -0
  54. data/lib/foreman_api/version.rb +1 -1
  55. metadata +7 -3
data/doc/_index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
- Documentation by YARD 0.8.5.2
7
+ Documentation by YARD 0.8.3
8
8
 
9
9
  </title>
10
10
 
@@ -56,7 +56,7 @@
56
56
 
57
57
  <iframe id="search_frame"></iframe>
58
58
 
59
- <div id="content"><h1 class="noborder title">Documentation by YARD 0.8.5.2</h1>
59
+ <div id="content"><h1 class="noborder title">Documentation by YARD 0.8.3</h1>
60
60
  <div id="listing">
61
61
  <h1 class="alphaindex">Alphabetic Index</h1>
62
62
 
@@ -278,6 +278,13 @@
278
278
  <li class="letter">L</li>
279
279
  <ul>
280
280
 
281
+ <li>
282
+ <span class='object_link'><a href="ForemanApi/Resources/Location.html" title="ForemanApi::Resources::Location (class)">Location</a></span>
283
+
284
+ <small>(ForemanApi::Resources)</small>
285
+
286
+ </li>
287
+
281
288
  <li>
282
289
  <span class='object_link'><a href="ForemanApi/Resources/LookupKey.html" title="ForemanApi::Resources::LookupKey (class)">LookupKey</a></span>
283
290
 
@@ -322,6 +329,13 @@
322
329
 
323
330
  </li>
324
331
 
332
+ <li>
333
+ <span class='object_link'><a href="ForemanApi/Resources/Organization.html" title="ForemanApi::Resources::Organization (class)">Organization</a></span>
334
+
335
+ <small>(ForemanApi::Resources)</small>
336
+
337
+ </li>
338
+
325
339
  </ul>
326
340
  </ul>
327
341
 
@@ -468,9 +482,9 @@
468
482
  </div>
469
483
 
470
484
  <div id="footer">
471
- Generated on Tue Mar 19 09:50:22 2013 by
485
+ Generated on Thu Jun 20 12:05:19 2013 by
472
486
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
473
- 0.8.5.2 (ruby-1.8.7).
487
+ 0.8.3 (ruby-1.9.3).
474
488
  </div>
475
489
 
476
490
  </body>
data/doc/class_list.html CHANGED
@@ -45,7 +45,7 @@
45
45
 
46
46
  <ul id="full_list" class="class">
47
47
  <li><span class='object_link'><a href="top-level-namespace.html" title=" (root)">Top Level Namespace</a></span></li>
48
- <li><a class='toggle'></a> <span class='object_link'><a href="ForemanApi.html" title="ForemanApi (module)">ForemanApi</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="ForemanApi/Resources.html" title="ForemanApi::Resources (module)">Resources</a></span><small class='search_info'>ForemanApi</small></li><ul><li><span class='object_link'><a href="ForemanApi/Resources/Architecture.html" title="ForemanApi::Resources::Architecture (class)">Architecture</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Audit.html" title="ForemanApi::Resources::Audit (class)">Audit</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/AuthSourceLdap.html" title="ForemanApi::Resources::AuthSourceLdap (class)">AuthSourceLdap</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Bookmark.html" title="ForemanApi::Resources::Bookmark (class)">Bookmark</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/CommonParameter.html" title="ForemanApi::Resources::CommonParameter (class)">CommonParameter</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/ComputeResource.html" title="ForemanApi::Resources::ComputeResource (class)">ComputeResource</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/ConfigTemplate.html" title="ForemanApi::Resources::ConfigTemplate (class)">ConfigTemplate</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Dashboard.html" title="ForemanApi::Resources::Dashboard (class)">Dashboard</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Domain.html" title="ForemanApi::Resources::Domain (class)">Domain</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Environment.html" title="ForemanApi::Resources::Environment (class)">Environment</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/FactValue.html" title="ForemanApi::Resources::FactValue (class)">FactValue</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Home.html" title="ForemanApi::Resources::Home (class)">Home</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Host.html" title="ForemanApi::Resources::Host (class)">Host</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/HostClass.html" title="ForemanApi::Resources::HostClass (class)">HostClass</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Hostgroup.html" title="ForemanApi::Resources::Hostgroup (class)">Hostgroup</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/HostgroupClass.html" title="ForemanApi::Resources::HostgroupClass (class)">HostgroupClass</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Image.html" title="ForemanApi::Resources::Image (class)">Image</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/LookupKey.html" title="ForemanApi::Resources::LookupKey (class)">LookupKey</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Medium.html" title="ForemanApi::Resources::Medium (class)">Medium</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Model.html" title="ForemanApi::Resources::Model (class)">Model</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/OperatingSystem.html" title="ForemanApi::Resources::OperatingSystem (class)">OperatingSystem</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Parameter.html" title="ForemanApi::Resources::Parameter (class)">Parameter</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Ptable.html" title="ForemanApi::Resources::Ptable (class)">Ptable</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Puppetclass.html" title="ForemanApi::Resources::Puppetclass (class)">Puppetclass</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Report.html" title="ForemanApi::Resources::Report (class)">Report</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Role.html" title="ForemanApi::Resources::Role (class)">Role</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Setting.html" title="ForemanApi::Resources::Setting (class)">Setting</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/SmartProxy.html" title="ForemanApi::Resources::SmartProxy (class)">SmartProxy</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Subnet.html" title="ForemanApi::Resources::Subnet (class)">Subnet</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/TemplateCombination.html" title="ForemanApi::Resources::TemplateCombination (class)">TemplateCombination</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/TemplateKind.html" title="ForemanApi::Resources::TemplateKind (class)">TemplateKind</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/User.html" title="ForemanApi::Resources::User (class)">User</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Usergroup.html" title="ForemanApi::Resources::Usergroup (class)">Usergroup</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li></ul></ul>
48
+ <li><a class='toggle'></a> <span class='object_link'><a href="ForemanApi.html" title="ForemanApi (module)">ForemanApi</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="ForemanApi/Resources.html" title="ForemanApi::Resources (module)">Resources</a></span><small class='search_info'>ForemanApi</small></li><ul><li><span class='object_link'><a href="ForemanApi/Resources/Architecture.html" title="ForemanApi::Resources::Architecture (class)">Architecture</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Audit.html" title="ForemanApi::Resources::Audit (class)">Audit</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/AuthSourceLdap.html" title="ForemanApi::Resources::AuthSourceLdap (class)">AuthSourceLdap</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Bookmark.html" title="ForemanApi::Resources::Bookmark (class)">Bookmark</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/CommonParameter.html" title="ForemanApi::Resources::CommonParameter (class)">CommonParameter</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/ComputeResource.html" title="ForemanApi::Resources::ComputeResource (class)">ComputeResource</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/ConfigTemplate.html" title="ForemanApi::Resources::ConfigTemplate (class)">ConfigTemplate</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Dashboard.html" title="ForemanApi::Resources::Dashboard (class)">Dashboard</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Domain.html" title="ForemanApi::Resources::Domain (class)">Domain</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Environment.html" title="ForemanApi::Resources::Environment (class)">Environment</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/FactValue.html" title="ForemanApi::Resources::FactValue (class)">FactValue</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Home.html" title="ForemanApi::Resources::Home (class)">Home</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Host.html" title="ForemanApi::Resources::Host (class)">Host</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/HostClass.html" title="ForemanApi::Resources::HostClass (class)">HostClass</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Hostgroup.html" title="ForemanApi::Resources::Hostgroup (class)">Hostgroup</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/HostgroupClass.html" title="ForemanApi::Resources::HostgroupClass (class)">HostgroupClass</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Image.html" title="ForemanApi::Resources::Image (class)">Image</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Location.html" title="ForemanApi::Resources::Location (class)">Location</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/LookupKey.html" title="ForemanApi::Resources::LookupKey (class)">LookupKey</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Medium.html" title="ForemanApi::Resources::Medium (class)">Medium</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Model.html" title="ForemanApi::Resources::Model (class)">Model</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/OperatingSystem.html" title="ForemanApi::Resources::OperatingSystem (class)">OperatingSystem</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Organization.html" title="ForemanApi::Resources::Organization (class)">Organization</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Parameter.html" title="ForemanApi::Resources::Parameter (class)">Parameter</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Ptable.html" title="ForemanApi::Resources::Ptable (class)">Ptable</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Puppetclass.html" title="ForemanApi::Resources::Puppetclass (class)">Puppetclass</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Report.html" title="ForemanApi::Resources::Report (class)">Report</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Role.html" title="ForemanApi::Resources::Role (class)">Role</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Setting.html" title="ForemanApi::Resources::Setting (class)">Setting</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/SmartProxy.html" title="ForemanApi::Resources::SmartProxy (class)">SmartProxy</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Subnet.html" title="ForemanApi::Resources::Subnet (class)">Subnet</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/TemplateCombination.html" title="ForemanApi::Resources::TemplateCombination (class)">TemplateCombination</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/TemplateKind.html" title="ForemanApi::Resources::TemplateKind (class)">TemplateKind</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/User.html" title="ForemanApi::Resources::User (class)">User</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li><li><span class='object_link'><a href="ForemanApi/Resources/Usergroup.html" title="ForemanApi::Resources::Usergroup (class)">Usergroup</a></span> &lt; Base<small class='search_info'>ForemanApi::Resources</small></li></ul></ul>
49
49
 
50
50
  </ul>
51
51
  </div>
data/doc/css/style.css CHANGED
@@ -27,16 +27,6 @@ h2 small { font-weight: normal; font-size: 0.7em; display: block; float: right;
27
27
  .rdoc-term { padding-right: 25px; font-weight: bold; }
28
28
  .rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; }
29
29
 
30
- /* style for <table> */
31
- #filecontents table, .docstring table { border-collapse: collapse; }
32
- #filecontents table th, #filecontents table td,
33
- .docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; }
34
- #filecontents table tr:nth-child(odd),
35
- .docstring table tr:nth-child(odd) { background: #eee; }
36
- #filecontents table tr:nth-child(even),
37
- .docstring table tr:nth-child(even) { background: #fff; }
38
- #filecontents table th, .docstring table th { background: #fff; }
39
-
40
30
  /* style for <ul> */
41
31
  #filecontents li > p, .docstring li > p { margin: 0px; }
42
32
  #filecontents ul, .docstring ul { padding-left: 20px; }
@@ -2,11 +2,11 @@
2
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
4
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
6
6
  <title>
7
7
  File: MIT-LICENSE
8
8
 
9
- &mdash; Documentation by YARD 0.8.5.2
9
+ &mdash; Documentation by YARD 0.8.3
10
10
 
11
11
  </title>
12
12
 
@@ -61,37 +61,32 @@
61
61
 
62
62
  <iframe id="search_frame"></iframe>
63
63
 
64
- <div id="content"><div id='filecontents'><p>
65
- Copyright 2012 Red Hat, Inc.
66
- </p>
67
- <p>
68
- Permission is hereby granted, free of charge, to any person obtaining a
69
- copy of this software and associated documentation files (the
70
- &quot;Software&quot;), to deal in the Software without restriction,
71
- including without limitation the rights to use, copy, modify, merge,
72
- publish, distribute, sublicense, and/or sell copies of the Software, and to
73
- permit persons to whom the Software is furnished to do so, subject to the
74
- following conditions:
75
- </p>
76
- <p>
77
- The above copyright notice and this permission notice shall be included in
78
- all copies or substantial portions of the Software.
79
- </p>
80
- <p>
81
- THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
82
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
83
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
84
- NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
85
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
86
- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
87
- USE OR OTHER DEALINGS IN THE SOFTWARE.
88
- </p>
64
+ <div id="content"><div id='filecontents'>
65
+ <p>Copyright 2012 Red Hat, Inc.</p>
66
+
67
+ <p>Permission is hereby granted, free of charge, to any person obtaining a
68
+ copy of this software and associated documentation files (the "Software"),
69
+ to deal in the Software without restriction, including without limitation
70
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
71
+ and/or sell copies of the Software, and to permit persons to whom the
72
+ Software is furnished to do so, subject to the following conditions:</p>
73
+
74
+ <p>The above copyright notice and this permission notice shall be included in
75
+ all copies or substantial portions of the Software.</p>
76
+
77
+ <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
78
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
79
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
80
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
81
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
82
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
83
+ DEALINGS IN THE SOFTWARE.</p>
89
84
  </div></div>
90
85
 
91
86
  <div id="footer">
92
- Generated on Tue Mar 19 09:50:22 2013 by
87
+ Generated on Thu Jun 20 12:05:19 2013 by
93
88
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
94
- 0.8.5.2 (ruby-1.8.7).
89
+ 0.8.3 (ruby-1.9.3).
95
90
  </div>
96
91
 
97
92
  </body>
data/doc/file.README.html CHANGED
@@ -2,11 +2,11 @@
2
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
4
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.8.5.2
9
+ &mdash; Documentation by YARD 0.8.3
10
10
 
11
11
  </title>
12
12
 
@@ -61,69 +61,90 @@
61
61
 
62
62
  <iframe id="search_frame"></iframe>
63
63
 
64
- <div id="content"><div id='filecontents'><h1>Foreman API bindings for Ruby</h1>
65
- <h2>Summary</h2>
66
- <pre class="code ruby"><code class="ruby">
67
- <span class='rubyid_require identifier id'>require</span> <span class='string val'>'foreman_api'</span>
68
- <span class='rubyid_architectures identifier id'>architectures</span> <span class='assign token'>=</span> <span class='rubyid_ForemanApi constant id'>ForemanApi</span><span class='colon2 op'>::</span><span class='rubyid_Resources constant id'>Resources</span><span class='colon2 op'>::</span><span class='rubyid_Architecture constant id'>Architecture</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:base_url</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'http://localhost:3000'</span><span class='comma token'>,</span>
69
- <span class='symbol val'>:username</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'admin'</span><span class='comma token'>,</span>
70
- <span class='symbol val'>:password</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'changeme'</span><span class='rparen token'>)</span>
71
-
72
- <span class='rubyid_pp identifier id'>pp</span> <span class='rubyid_architectures identifier id'>architectures</span><span class='dot token'>.</span><span class='rubyid_index identifier id'>index</span>
73
- <span class='lbrack token'>[</span><span class='lbrack token'>[</span><span class='lbrace token'>{</span><span class='string val'>&quot;architecture&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='string val'>&quot;id&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='integer val'>5</span><span class='comma token'>,</span> <span class='string val'>&quot;name&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;i386&quot;</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
74
- <span class='lbrace token'>{</span><span class='string val'>&quot;architecture&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='string val'>&quot;id&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='integer val'>9</span><span class='comma token'>,</span> <span class='string val'>&quot;name&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;ppc&quot;</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
75
- <span class='lbrace token'>{</span><span class='string val'>&quot;architecture&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='string val'>&quot;id&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='integer val'>14</span><span class='comma token'>,</span> <span class='string val'>&quot;name&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;x86_64&quot;</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='rbrack token'>]</span><span class='comma token'>,</span>
76
- <span class='string val'>&quot;[{\&quot;architecture\&quot;:{\&quot;name\&quot;:\&quot;i386\&quot;,\&quot;id\&quot;:5}},{\&quot;architecture\&quot;:{\&quot;name\&quot;:\&quot;ppc\&quot;,\&quot;id\&quot;:9}},{\&quot;architecture\&quot;:{\&quot;name\&quot;:\&quot;x86_64\&quot;,\&quot;id\&quot;:14}}]&quot;</span><span class='rbrack token'>]</span>
77
- <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_nil nil kw'>nil</span>
78
- </code></pre>
79
- <h2>Description</h2>
80
- <p>
81
- This gem contains Foreman API bindings for the Ruby language. The bindings
82
- are generated from API documentation using
83
- Apidoc[https://github.com/Pajk/apipie-rails] tool.
84
- </p>
85
- <p>
86
- The bindings brings support for new versioned API which is not complete
64
+ <div id="content"><div id='filecontents'>
65
+ <h1 id="label-Foreman+API+bindings+for+Ruby">Foreman API bindings for Ruby</h1>
66
+
67
+ <h2 id="label-Summary">Summary</h2>
68
+
69
+ <p>Usage:</p>
70
+
71
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'foreman_api'</span>
72
+ <span class="ruby-identifier">require</span> <span class="ruby-string">'logger'</span> <span class="ruby-comment"># optional</span>
73
+
74
+ <span class="ruby-identifier">architectures</span> = <span class="ruby-constant">ForemanApi</span><span class="ruby-operator">::</span><span class="ruby-constant">Resources</span><span class="ruby-operator">::</span><span class="ruby-constant">Architecture</span>.<span class="ruby-identifier">new</span>(
75
+ {
76
+ :<span class="ruby-identifier">logger</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">STDOUT</span>), <span class="ruby-comment"># optional</span>
77
+ :<span class="ruby-identifier">base_url</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'http://foreman-url'</span>,
78
+ :<span class="ruby-identifier">username</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'admin'</span>,
79
+ :<span class="ruby-identifier">password</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'changeme'</span>
80
+ })
81
+
82
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">architectures</span>.<span class="ruby-identifier">index</span>.<span class="ruby-identifier">inspect</span>
83
+ </pre>
84
+
85
+ <h2 id="label-Description">Description</h2>
86
+
87
+ <p>This gem contains Foreman API bindings for the Ruby language. The bindings
88
+ are generated from API documentation using <a
89
+ href="https://github.com/Pajk/apipie-rails">Apidoc</a> tool.</p>
90
+
91
+ <p>The bindings brings support for new versioned API which is not complete
87
92
  yet. The number of supported controllers is limited but more are coming
88
- soon.
89
- </p>
90
- <h3>Regenerating bindings</h3>
91
- <p>
92
- The code for generating the bindings is a part of this repo. The generator
93
- needs a running Foreman instance to load the apidoc.json.
94
- </p>
95
- <p>
96
- Usage:
97
- </p>
98
- <pre class="code ruby"><code class="ruby">
99
- <span class='rubyid_bin identifier id'>bin</span><span class='div op'>/</span><span class='rubyid_generate identifier id'>generate</span><span class='dot token'>.</span><span class='rubyid_rb identifier id'>rb</span> <span class='minus op'>-</span><span class='rubyid_h identifier id'>h</span>
100
- <span class='rubyid_Script constant id'>Script</span> <span class='rubyid_for for kw'>for</span> <span class='rubyid_generating identifier id'>generating</span> <span class='rubyid_API constant id'>API</span> <span class='rubyid_bindings identifier id'>bindings</span> <span class='rubyid_for for kw'>for</span> <span class='rubyid_Foreman constant id'>Foreman</span> <span class='rubyid_API constant id'>API</span> <span class='rubyid_from identifier id'>from</span> <span class='rubyid_Apipie constant id'>Apipie</span> <span class='rubyid_docs identifier id'>docs</span><span class='dot token'>.</span>
101
- <span class='minus op'>-</span><span class='rubyid_u identifier id'>u</span><span class='comma token'>,</span> <span class='minus op'>-</span><span class='minus op'>-</span><span class='rubyid_url identifier id'>url</span> <span class='rubyid_FOREMAN_APIDOC_URL constant id'>FOREMAN_APIDOC_URL</span> <span class='rubyid_By constant id'>By</span> <span class='rubyid_default identifier id'>default</span> <span class='rubyid_http identifier id'>http</span><span class='symbol val'>:/</span><span class='regexp val'>/localhost:3000/</span><span class='rubyid_apidoc identifier id'>apidoc</span>
102
- <span class='minus op'>-</span><span class='rubyid_h identifier id'>h</span><span class='comma token'>,</span> <span class='minus op'>-</span><span class='minus op'>-</span><span class='rubyid_help identifier id'>help</span>
103
- </code></pre>
104
- <p>
105
- Only files under <tt>lib/foreman_api/resources</tt> are touched by the generator.
106
- </p>
107
- <h3>Authentication</h3>
108
- <p>
109
- Foreman API supports authentication with username/password and OAuth. For
110
- use of OAuth with the bindings you only have to change the params
111
- </p>
112
- <pre class="code ruby"><code class="ruby">
113
- <span class='rubyid_architectures identifier id'>architectures</span> <span class='assign token'>=</span> <span class='rubyid_ForemanApi constant id'>ForemanApi</span><span class='colon2 op'>::</span><span class='rubyid_Resources constant id'>Resources</span><span class='colon2 op'>::</span><span class='rubyid_Architecture constant id'>Architecture</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:base_url</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'http://localhost:3000'</span><span class='comma token'>,</span>
114
- <span class='symbol val'>:oauth</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrace token'>{</span> <span class='symbol val'>:consumer_key</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'mykey'</span><span class='comma token'>,</span>
115
- <span class='symbol val'>:consumer_secret</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'shhhh'</span> <span class='rbrace token'>}</span><span class='rparen token'>)</span>
116
- </code></pre>
117
- <h2>License</h2>
118
- <p>
119
- The bindings are released under MIT license
120
- </p>
93
+ soon.</p>
94
+
95
+ <h3 id="label-Regenerating+bindings">Regenerating bindings</h3>
96
+
97
+ <p>The code for generating the bindings is a part of this repo. The generator
98
+ needs a running Foreman instance to load the apidoc.json.</p>
99
+
100
+ <p>Usage:</p>
101
+
102
+ <pre class="code ruby"><code>bin/generate.rb -h
103
+ Script for generating API bindings for Foreman API from Apipie docs.
104
+ -u, --url FOREMAN_APIDOC_URL By default http://localhost:3000/apidoc
105
+ -h, --help</code></pre>
106
+
107
+ <p>Only files under <code>lib/foreman_api/resources</code> are touched by the
108
+ generator.</p>
109
+
110
+ <h3 id="label-Authentication">Authentication</h3>
111
+
112
+ <p>Foreman API uses OAuth for authentication, you need to provide url, key and
113
+ secret. Also, it is required to provide user which will be used for the
114
+ request if oauth_map_users setting in the Foreman instance is set,
115
+ otherwise 401 error will occur and Foreman log will state "users mapping
116
+ error".</p>
117
+
118
+ <p>When setting base_url make sure it *does not* include trailing slash,
119
+ otherwise request can be refused with 401.</p>
120
+
121
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'foreman_api'</span>
122
+
123
+ <span class="ruby-identifier">architectures</span> = <span class="ruby-constant">ForemanApi</span><span class="ruby-operator">::</span><span class="ruby-constant">Resources</span><span class="ruby-operator">::</span><span class="ruby-constant">Architecture</span>.<span class="ruby-identifier">new</span>(
124
+ {
125
+ :<span class="ruby-identifier">base_url</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'http://foreman-url'</span>,
126
+ :<span class="ruby-identifier">oauth</span> =<span class="ruby-operator">&gt;</span> {
127
+ :<span class="ruby-identifier">consumer_key</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'katello'</span>,
128
+ :<span class="ruby-identifier">consumer_secret</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;shhhh&quot;</span>
129
+ }
130
+ },{
131
+ :<span class="ruby-identifier">headers</span> =<span class="ruby-operator">&gt;</span> {
132
+ :<span class="ruby-identifier">foreman_user</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;admin&quot;</span>,
133
+ }
134
+ })
135
+
136
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">architectures</span>.<span class="ruby-identifier">index</span>.<span class="ruby-identifier">inspect</span>
137
+ </pre>
138
+
139
+ <h2 id="label-License">License</h2>
140
+
141
+ <p>The bindings are released under MIT license</p>
121
142
  </div></div>
122
143
 
123
144
  <div id="footer">
124
- Generated on Tue Mar 19 09:50:22 2013 by
145
+ Generated on Thu Jun 20 12:05:19 2013 by
125
146
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
- 0.8.5.2 (ruby-1.8.7).
147
+ 0.8.3 (ruby-1.9.3).
127
148
  </div>
128
149
 
129
150
  </body>
data/doc/frames.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
5
  <head>
6
6
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7
- <title>Documentation by YARD 0.8.5.2</title>
7
+ <title>Documentation by YARD 0.8.3</title>
8
8
  </head>
9
9
  <script type="text/javascript" charset="utf-8">
10
10
  window.onload = function() {
data/doc/index.html CHANGED
@@ -2,11 +2,11 @@
2
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
4
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.8.5.2
9
+ &mdash; Documentation by YARD 0.8.3
10
10
 
11
11
  </title>
12
12
 
@@ -61,69 +61,90 @@
61
61
 
62
62
  <iframe id="search_frame"></iframe>
63
63
 
64
- <div id="content"><div id='filecontents'><h1>Foreman API bindings for Ruby</h1>
65
- <h2>Summary</h2>
66
- <pre class="code ruby"><code class="ruby">
67
- <span class='rubyid_require identifier id'>require</span> <span class='string val'>'foreman_api'</span>
68
- <span class='rubyid_architectures identifier id'>architectures</span> <span class='assign token'>=</span> <span class='rubyid_ForemanApi constant id'>ForemanApi</span><span class='colon2 op'>::</span><span class='rubyid_Resources constant id'>Resources</span><span class='colon2 op'>::</span><span class='rubyid_Architecture constant id'>Architecture</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:base_url</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'http://localhost:3000'</span><span class='comma token'>,</span>
69
- <span class='symbol val'>:username</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'admin'</span><span class='comma token'>,</span>
70
- <span class='symbol val'>:password</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'changeme'</span><span class='rparen token'>)</span>
71
-
72
- <span class='rubyid_pp identifier id'>pp</span> <span class='rubyid_architectures identifier id'>architectures</span><span class='dot token'>.</span><span class='rubyid_index identifier id'>index</span>
73
- <span class='lbrack token'>[</span><span class='lbrack token'>[</span><span class='lbrace token'>{</span><span class='string val'>&quot;architecture&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='string val'>&quot;id&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='integer val'>5</span><span class='comma token'>,</span> <span class='string val'>&quot;name&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;i386&quot;</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
74
- <span class='lbrace token'>{</span><span class='string val'>&quot;architecture&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='string val'>&quot;id&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='integer val'>9</span><span class='comma token'>,</span> <span class='string val'>&quot;name&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;ppc&quot;</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
75
- <span class='lbrace token'>{</span><span class='string val'>&quot;architecture&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='string val'>&quot;id&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='integer val'>14</span><span class='comma token'>,</span> <span class='string val'>&quot;name&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;x86_64&quot;</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='rbrack token'>]</span><span class='comma token'>,</span>
76
- <span class='string val'>&quot;[{\&quot;architecture\&quot;:{\&quot;name\&quot;:\&quot;i386\&quot;,\&quot;id\&quot;:5}},{\&quot;architecture\&quot;:{\&quot;name\&quot;:\&quot;ppc\&quot;,\&quot;id\&quot;:9}},{\&quot;architecture\&quot;:{\&quot;name\&quot;:\&quot;x86_64\&quot;,\&quot;id\&quot;:14}}]&quot;</span><span class='rbrack token'>]</span>
77
- <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_nil nil kw'>nil</span>
78
- </code></pre>
79
- <h2>Description</h2>
80
- <p>
81
- This gem contains Foreman API bindings for the Ruby language. The bindings
82
- are generated from API documentation using
83
- Apidoc[https://github.com/Pajk/apipie-rails] tool.
84
- </p>
85
- <p>
86
- The bindings brings support for new versioned API which is not complete
64
+ <div id="content"><div id='filecontents'>
65
+ <h1 id="label-Foreman+API+bindings+for+Ruby">Foreman API bindings for Ruby</h1>
66
+
67
+ <h2 id="label-Summary">Summary</h2>
68
+
69
+ <p>Usage:</p>
70
+
71
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'foreman_api'</span>
72
+ <span class="ruby-identifier">require</span> <span class="ruby-string">'logger'</span> <span class="ruby-comment"># optional</span>
73
+
74
+ <span class="ruby-identifier">architectures</span> = <span class="ruby-constant">ForemanApi</span><span class="ruby-operator">::</span><span class="ruby-constant">Resources</span><span class="ruby-operator">::</span><span class="ruby-constant">Architecture</span>.<span class="ruby-identifier">new</span>(
75
+ {
76
+ :<span class="ruby-identifier">logger</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">STDOUT</span>), <span class="ruby-comment"># optional</span>
77
+ :<span class="ruby-identifier">base_url</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'http://foreman-url'</span>,
78
+ :<span class="ruby-identifier">username</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'admin'</span>,
79
+ :<span class="ruby-identifier">password</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'changeme'</span>
80
+ })
81
+
82
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">architectures</span>.<span class="ruby-identifier">index</span>.<span class="ruby-identifier">inspect</span>
83
+ </pre>
84
+
85
+ <h2 id="label-Description">Description</h2>
86
+
87
+ <p>This gem contains Foreman API bindings for the Ruby language. The bindings
88
+ are generated from API documentation using <a
89
+ href="https://github.com/Pajk/apipie-rails">Apidoc</a> tool.</p>
90
+
91
+ <p>The bindings brings support for new versioned API which is not complete
87
92
  yet. The number of supported controllers is limited but more are coming
88
- soon.
89
- </p>
90
- <h3>Regenerating bindings</h3>
91
- <p>
92
- The code for generating the bindings is a part of this repo. The generator
93
- needs a running Foreman instance to load the apidoc.json.
94
- </p>
95
- <p>
96
- Usage:
97
- </p>
98
- <pre class="code ruby"><code class="ruby">
99
- <span class='rubyid_bin identifier id'>bin</span><span class='div op'>/</span><span class='rubyid_generate identifier id'>generate</span><span class='dot token'>.</span><span class='rubyid_rb identifier id'>rb</span> <span class='minus op'>-</span><span class='rubyid_h identifier id'>h</span>
100
- <span class='rubyid_Script constant id'>Script</span> <span class='rubyid_for for kw'>for</span> <span class='rubyid_generating identifier id'>generating</span> <span class='rubyid_API constant id'>API</span> <span class='rubyid_bindings identifier id'>bindings</span> <span class='rubyid_for for kw'>for</span> <span class='rubyid_Foreman constant id'>Foreman</span> <span class='rubyid_API constant id'>API</span> <span class='rubyid_from identifier id'>from</span> <span class='rubyid_Apipie constant id'>Apipie</span> <span class='rubyid_docs identifier id'>docs</span><span class='dot token'>.</span>
101
- <span class='minus op'>-</span><span class='rubyid_u identifier id'>u</span><span class='comma token'>,</span> <span class='minus op'>-</span><span class='minus op'>-</span><span class='rubyid_url identifier id'>url</span> <span class='rubyid_FOREMAN_APIDOC_URL constant id'>FOREMAN_APIDOC_URL</span> <span class='rubyid_By constant id'>By</span> <span class='rubyid_default identifier id'>default</span> <span class='rubyid_http identifier id'>http</span><span class='symbol val'>:/</span><span class='regexp val'>/localhost:3000/</span><span class='rubyid_apidoc identifier id'>apidoc</span>
102
- <span class='minus op'>-</span><span class='rubyid_h identifier id'>h</span><span class='comma token'>,</span> <span class='minus op'>-</span><span class='minus op'>-</span><span class='rubyid_help identifier id'>help</span>
103
- </code></pre>
104
- <p>
105
- Only files under <tt>lib/foreman_api/resources</tt> are touched by the generator.
106
- </p>
107
- <h3>Authentication</h3>
108
- <p>
109
- Foreman API supports authentication with username/password and OAuth. For
110
- use of OAuth with the bindings you only have to change the params
111
- </p>
112
- <pre class="code ruby"><code class="ruby">
113
- <span class='rubyid_architectures identifier id'>architectures</span> <span class='assign token'>=</span> <span class='rubyid_ForemanApi constant id'>ForemanApi</span><span class='colon2 op'>::</span><span class='rubyid_Resources constant id'>Resources</span><span class='colon2 op'>::</span><span class='rubyid_Architecture constant id'>Architecture</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:base_url</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'http://localhost:3000'</span><span class='comma token'>,</span>
114
- <span class='symbol val'>:oauth</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrace token'>{</span> <span class='symbol val'>:consumer_key</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'mykey'</span><span class='comma token'>,</span>
115
- <span class='symbol val'>:consumer_secret</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'shhhh'</span> <span class='rbrace token'>}</span><span class='rparen token'>)</span>
116
- </code></pre>
117
- <h2>License</h2>
118
- <p>
119
- The bindings are released under MIT license
120
- </p>
93
+ soon.</p>
94
+
95
+ <h3 id="label-Regenerating+bindings">Regenerating bindings</h3>
96
+
97
+ <p>The code for generating the bindings is a part of this repo. The generator
98
+ needs a running Foreman instance to load the apidoc.json.</p>
99
+
100
+ <p>Usage:</p>
101
+
102
+ <pre class="code ruby"><code>bin/generate.rb -h
103
+ Script for generating API bindings for Foreman API from Apipie docs.
104
+ -u, --url FOREMAN_APIDOC_URL By default http://localhost:3000/apidoc
105
+ -h, --help</code></pre>
106
+
107
+ <p>Only files under <code>lib/foreman_api/resources</code> are touched by the
108
+ generator.</p>
109
+
110
+ <h3 id="label-Authentication">Authentication</h3>
111
+
112
+ <p>Foreman API uses OAuth for authentication, you need to provide url, key and
113
+ secret. Also, it is required to provide user which will be used for the
114
+ request if oauth_map_users setting in the Foreman instance is set,
115
+ otherwise 401 error will occur and Foreman log will state "users mapping
116
+ error".</p>
117
+
118
+ <p>When setting base_url make sure it *does not* include trailing slash,
119
+ otherwise request can be refused with 401.</p>
120
+
121
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'foreman_api'</span>
122
+
123
+ <span class="ruby-identifier">architectures</span> = <span class="ruby-constant">ForemanApi</span><span class="ruby-operator">::</span><span class="ruby-constant">Resources</span><span class="ruby-operator">::</span><span class="ruby-constant">Architecture</span>.<span class="ruby-identifier">new</span>(
124
+ {
125
+ :<span class="ruby-identifier">base_url</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'http://foreman-url'</span>,
126
+ :<span class="ruby-identifier">oauth</span> =<span class="ruby-operator">&gt;</span> {
127
+ :<span class="ruby-identifier">consumer_key</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'katello'</span>,
128
+ :<span class="ruby-identifier">consumer_secret</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;shhhh&quot;</span>
129
+ }
130
+ },{
131
+ :<span class="ruby-identifier">headers</span> =<span class="ruby-operator">&gt;</span> {
132
+ :<span class="ruby-identifier">foreman_user</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;admin&quot;</span>,
133
+ }
134
+ })
135
+
136
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">architectures</span>.<span class="ruby-identifier">index</span>.<span class="ruby-identifier">inspect</span>
137
+ </pre>
138
+
139
+ <h2 id="label-License">License</h2>
140
+
141
+ <p>The bindings are released under MIT license</p>
121
142
  </div></div>
122
143
 
123
144
  <div id="footer">
124
- Generated on Tue Mar 19 09:50:22 2013 by
145
+ Generated on Thu Jun 20 12:05:19 2013 by
125
146
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
- 0.8.5.2 (ruby-1.8.7).
147
+ 0.8.3 (ruby-1.9.3).
127
148
  </div>
128
149
 
129
150
  </body>